Commit f9e504d7 authored by Matthias Clasen's avatar Matthias Clasen

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.
parent d3aea5c4
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment