mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
x11 drag: Fix mapped error
In the gtk-demo drag-and-drop demo i can't drag anything, all I get is: (gtk4-demo:358993): Gdk-CRITICAL **: 09:36:19.617: Surface 0x7e1bb0 has not been mapped in GdkSeatGrabPrepareFunc This is because GdkX11Drag.ipc_surface is not considered mapped, even though we called gdk_x11_surface_show() on it, because the GDK_SURFACE_STATE_WITHDRAWN flag is still set. I added calls to gdk_synthesize_surface_state() to match what e.g. show_popup() and gdk_x11_toplevel_present() does.
This commit is contained in:
parent
64db8be7d5
commit
e702d42597
@ -2028,6 +2028,8 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
x11_drag->ipc_surface = ipc_surface;
|
||||
if (gdk_x11_surface_get_group (surface))
|
||||
gdk_x11_surface_set_group (x11_drag->ipc_surface, surface);
|
||||
|
||||
gdk_synthesize_surface_state (x11_drag->ipc_surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
|
||||
gdk_x11_surface_show (x11_drag->ipc_surface, FALSE);
|
||||
|
||||
x11_drag->drag_surface = create_drag_surface (display);
|
||||
|
Loading…
Reference in New Issue
Block a user