[gtk/wip/otte/for-master: 3/3] x11: When clearing old Drop, emit LEAVE event
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 3/3] x11: When clearing old Drop, emit LEAVE event
- Date: Fri, 21 Feb 2020 17:07:53 +0000 (UTC)
commit 6b76ceac98279ba8f8cf1716756384aacbc04cf6
Author: Benjamin Otte <otte redhat com>
Date: Wed Feb 19 04:41:28 2020 +0100
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.
gdk/x11/gdkdrop-x11.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]