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 765565 - Wayland: Inspector GtkLabel drag'n'drop crashes client
Wayland: Inspector GtkLabel drag'n'drop crashes client
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-04-26 00:24 UTC by Jonas Ådahl
Modified: 2016-04-26 15:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk/dnd: Don't use default display when getting cursor (8.65 KB, patch)
2016-04-26 07:48 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2016-04-26 00:24:02 UTC
To reproduce:

Open the inspector, select text in a selectable GtkLabel (like in the General tab), then try to drag that text.

The reason seems to be that a wl_buffer from one wl_display is attached to a wl_surface of another wl_display. This causes the compositor to disconnect the client, because the attached object may either non-existent on the other wl_display, or of the wrong type.
Comment 1 Jonas Ådahl 2016-04-26 07:48:19 UTC
Created attachment 326726 [details] [review]
gdk/dnd: Don't use default display when getting cursor

Always associate a drag context with a GdkDisplay and use that when
getting a cursor for a given action.

If we don't do this, dragging on a window that doesn't use the default
display will make us use cursors from the wrong display.
Comment 2 Jonas Ådahl 2016-04-26 07:49:48 UTC
Note that I have not build tested the win32 and quartz patches, as I have no such systems to test build on.
Comment 3 Carlos Garnacho 2016-04-26 11:30:13 UTC
Comment on attachment 326726 [details] [review]
gdk/dnd: Don't use default display when getting cursor

At least the common/x11/wayland bits look alright to me. The changes in win32/quartz seem indeed correct and harmless, but like you I can't tell for sure.

I'll refrain the a-c-n for now, but I'd be surprised if this broke anything.
Comment 4 Matthias Clasen 2016-04-26 14:52:36 UTC
Review of attachment 326726 [details] [review]:

Looks right to me
Comment 5 Jonas Ådahl 2016-04-26 15:09:15 UTC
Attachment 326726 [details] pushed as 1a4f000 - gdk/dnd: Don't use default display when getting cursor