diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2015-09-28 14:40:53 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2015-09-28 16:22:54 +0200 |
commit | 6f64d6b0aa8e8d054183624815c605f84a985c71 (patch) | |
tree | 72c9e3fc43e7fba5dc45fe76c2b34dc4f7f4920e | |
parent | ebeca983c7f9a847e3041db18e011e5cbe4fa44e (diff) | |
download | mutter-6f64d6b0aa8e8d054183624815c605f84a985c71.tar.gz |
wayland: Check the drag focus before processing XDND dest-side messages
If the drag dest surface suddenly disappears, we may find ourselves
processing an XdndPosition message that was sent before the X11 drag
source had an opportunity to find out.
In that case mutter does know, so double check before processing the
messages.
-rw-r--r-- | src/wayland/meta-xwayland-selection.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wayland/meta-xwayland-selection.c b/src/wayland/meta-xwayland-selection.c index efc450b45..3a97a40b8 100644 --- a/src/wayland/meta-xwayland-selection.c +++ b/src/wayland/meta-xwayland-selection.c @@ -1284,6 +1284,9 @@ meta_xwayland_selection_handle_client_message (MetaWaylandCompositor *compositor MetaWaylandDragGrab *drag_grab = compositor->seat->data_device.current_grab; MetaWaylandSurface *drag_focus = meta_wayland_drag_grab_get_focus (drag_grab); + if (!drag_focus) + return FALSE; + if (event->message_type == xdnd_atoms[ATOM_DND_ENTER]) { /* Bit 1 in data.l[1] determines whether there's 3 or less mimetype |