Commit Graph

21 Commits

Author SHA1 Message Date
emersion 81ed1efe4f
xwayland, data-device: fix surface state on unmap
This commit makes sure surface->mapped is true when the unmapped event is
emitted. This is necessary because listeners can only damage surfaces that are
mapped. This is similar to the fact that the destroy event is emitted before
any destruction is actually made.

Fixes https://github.com/swaywm/sway/issues/3568
2019-02-18 13:14:35 +01:00
emersion 556bf3ac31
data-device: destroy previous source when starting drag
This supersedes f24e17259e and
04c9ca4198. These commits were manually removing
wlr_data_source destroy handlers when starting a new drag. This is error-prone.

Instead, this commit destroys the previous source whenever we start a new drag.
2019-02-05 18:43:06 +01:00
John Chen f24e17259e Fix swaywm/sway#3545. 2019-02-02 14:05:31 +01:00
emersion 29952dee19
data-device: only allow one drag at a time 2019-01-30 15:24:18 +01:00
emersion c505ce3019
data-device: fix use-after-free on drop 2019-01-30 15:24:14 +01:00
emersion 909b3b16f3
data-device: add wlr_data_offer.type 2019-01-24 12:18:40 +01:00
emersion 84f278eca1
data-device: remove data_source_send_offer 2019-01-24 12:12:55 +01:00
emersion 1150ff13ce
data-device: make sources inert, rename cancel to destroy 2019-01-24 12:12:55 +01:00
emersion 5d26da9d15
data-device: allow multiple devices for the same seat
This commit makes it possible for a single client to have multiple data devices
for the same seat. This fixes issues with Firefox.

This mainly removes wlr_data_source.offer. We make sure we create one data
offer per device. We now make the offer inert when the source is destroyed.

Fixes the second half of https://github.com/swaywm/wlroots/issues/1041
2018-11-26 12:35:48 +01:00
emersion 2d0c5ec78e
Use _POSIX_C_SOURCE, use shm_open 2018-11-06 08:29:23 +01:00
nyorain f6168c2afe Fix #1129 and remove sx, sy from wlr_drag_icon
sx, sy used to store the buffer offset of the drag surface which was
then be added (by rootston) to the drag icon position.
Buffer offsets are handled already in surface_intersect_output
(output.c) so they were added twice for dnd surfaces.
2018-09-07 14:48:28 +02:00
emersion 33db4263a0
surface: replace wlr_surface_set_role_committed with wlr_surface_role 2018-07-07 22:45:16 +01:00
emersion adf0423f7c
surface: better buffer position handling 2018-07-04 19:12:17 +01:00
emersion 3c0d672ebd
surface: make pending and current embedded structs 2018-07-04 19:12:17 +01:00
Tony Crisci 7c888a39c6 update drag position at the right times 2018-06-05 23:45:03 -04:00
Tony Crisci 319ebdf476 add back map event 2018-06-05 22:50:29 -04:00
Tony Crisci 1c75d4e54a rename drag-icon map to unmap 2018-06-05 18:17:42 -04:00
Dominique Martinet 51b9883ea0 seat: allow clients to bind to seat multiple times
This lets clients bind to a seat multiple times by re-using the existing
wlr_seat_client whenever a duplicate request happens.
Previously, an independant wlr_seat_client would be created and only
events from one would be processed.

Fixes #1023.
2018-06-04 22:31:36 +09:00
emersion db84379242
Send axis source event 2018-05-12 13:53:21 +01:00
emersion 0b58579564
Add support for discrete axis values 2018-05-12 13:34:58 +01:00
emersion 1e563e7ecf
data-device: split into multiple files 2018-05-02 18:04:10 +01:00