After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770937 - wayland/data-device: Don't disconnect valid dnd client
wayland/data-device: Don't disconnect valid dnd client
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-09-06 10:09 UTC by Jonas Ådahl
Modified: 2016-09-15 02:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland/data-device: Don't disconnect valid dnd client (2.54 KB, patch)
2016-09-06 10:09 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2016-09-06 10:09:00 UTC
This fixes a bug where GTK+ would be disconnected due to an incorrectly raised error, when dragging from an Xwayland client onto GTK+ using Wayland.

Steps to reproduce:

 0. cd gtk+/tests
 1. GDK_BACKEND=x11 ./testdnd &
 2. GDK_BACKEND=wayland ./testdnd &
 3. Drag from the testdnd connecting via X11 onto the testdnd connecting via Wayland
 4. Goto 3

After 1 or more iterations of step 3 the testdnd connecting via Wayland would be disconnected.
Comment 1 Jonas Ådahl 2016-09-06 10:09:04 UTC
Created attachment 334888 [details] [review]
wayland/data-device: Don't disconnect valid dnd client

We cannot check 'has-target' or 'has-seat' when verifying a
wl_data_offer.finish request is valid or not, since the source may have
effected 'has-target' or whether theh source has a seat or not when the
finish request was already on the wire.

Instead of checking against the source state, keep track whether the
required operations has been done on the offer in question (i.e.
whether an action has been sent, or a mime type been accepted).

This fixes incorrectly raised error when dragging from gtk+'s testdnd
via Xwayland onto gtk+'s testdnd using Wayland.
Comment 2 Carlos Garnacho 2016-09-13 22:22:54 UTC
Comment on attachment 334888 [details] [review]
wayland/data-device: Don't disconnect valid dnd client

Indeed, Thanks for spotting.
Comment 3 Jonas Ådahl 2016-09-15 02:34:36 UTC
Attachment 334888 [details] pushed as 60bc679 - wayland/data-device: Don't disconnect valid dnd client