[gtk+] wayland: Keep the drag window alive longer
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Keep the drag window alive longer
- Date: Fri, 8 Jan 2016 16:33:36 +0000 (UTC)
commit f9e504d70e90686e32fd0c4b9ceab9f36a05ea53
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jan 8 11:22:47 2016 -0500
wayland: 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.
gdk/wayland/gdkdnd-wayland.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c
index 36259e9..8eb8688 100644
--- a/gdk/wayland/gdkdnd-wayland.c
+++ b/gdk/wayland/gdkdnd-wayland.c
@@ -68,6 +68,7 @@ gdk_wayland_drag_context_finalize (GObject *object)
{
GdkWaylandDragContext *wayland_context = GDK_WAYLAND_DRAG_CONTEXT (object);
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
+ GdkWindow *dnd_window;
contexts = g_list_remove (contexts, context);
@@ -86,10 +87,12 @@ gdk_wayland_drag_context_finalize (GObject *object)
if (wayland_context->data_source)
wl_data_source_destroy (wayland_context->data_source);
- if (wayland_context->dnd_window)
- gdk_window_destroy (wayland_context->dnd_window);
+ dnd_window = wayland_context->dnd_window;
G_OBJECT_CLASS (gdk_wayland_drag_context_parent_class)->finalize (object);
+
+ if (dnd_window)
+ gdk_window_destroy (dnd_window);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]