diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-01-08 11:29:58 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-01-08 11:33:24 -0500 |
commit | ea0084cd995283dee00a327c92d9896994e738e1 (patch) | |
tree | 771c7342e1418b395f9511b952dcf7c4157dd988 /gdk/x11 | |
parent | f9e504d70e90686e32fd0c4b9ceab9f36a05ea53 (diff) | |
download | gtk+-ea0084cd995283dee00a327c92d9896994e738e1.tar.gz |
x11: Keep the drag window alive longer
We destroy the widget that is wrapped around the drag window
when the object data on the drag context gets cleared. Destroying
the window before that happens leads to unpleasantries. E.g. we may
try to access the frame clock, which doesn't exist anymore, and
things go downhill from there. So, keep the window alive for
a little longer.
Diffstat (limited to 'gdk/x11')
-rw-r--r-- | gdk/x11/gdkdnd-x11.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c index 6bc87c43c2..dd0725262c 100644 --- a/gdk/x11/gdkdnd-x11.c +++ b/gdk/x11/gdkdnd-x11.c @@ -223,6 +223,7 @@ gdk_x11_drag_context_finalize (GObject *object) { GdkDragContext *context = GDK_DRAG_CONTEXT (object); GdkX11DragContext *x11_context = GDK_X11_DRAG_CONTEXT (object); + GdkWindow *drag_window; if (context->source_window) { @@ -235,7 +236,12 @@ gdk_x11_drag_context_finalize (GObject *object) contexts = g_list_remove (contexts, context); + drag_window = context->drag_window; + G_OBJECT_CLASS (gdk_x11_drag_context_parent_class)->finalize (object); + + if (drag_window) + gdk_window_destroy (drag_window); } /* Drag Contexts */ |