diff options
author | Benjamin Otte <otte@redhat.com> | 2020-02-19 04:41:28 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-02-21 18:19:16 +0100 |
commit | 608e624ecff3508d74a8251f43758c3ac598d035 (patch) | |
tree | 889a127f2a0dd49fe3e67d8c0ceddd069572ccf8 /gdk | |
parent | 808961564c1cb7224e3674b02792a7e42a0c7e23 (diff) | |
download | gtk+-608e624ecff3508d74a8251f43758c3ac598d035.tar.gz |
x11: When clearing old Drop, emit LEAVE event
This can happen when the old DND operation died (like due to a crash or
a broken XWayland compositor.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/x11/gdkdrop-x11.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdk/x11/gdkdrop-x11.c b/gdk/x11/gdkdrop-x11.c index 767adac7ab..c85c17be0f 100644 --- a/gdk/x11/gdkdrop-x11.c +++ b/gdk/x11/gdkdrop-x11.c @@ -503,7 +503,12 @@ xdnd_enter_filter (GdkSurface *surface, return TRUE; } - g_clear_object (&display_x11->current_drop); + if (display_x11->current_drop) + { + if (GDK_X11_DROP (display_x11->current_drop)->enter_emitted) + gdk_drop_emit_leave_event (display_x11->current_drop, FALSE, GDK_CURRENT_TIME); + g_clear_object (&display_x11->current_drop); + } seat = gdk_display_get_default_seat (display); |