mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-16 21:50:34 +00:00
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.
This commit is contained in:
parent
d3aea5c498
commit
f9e504d70e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user