gdk/x11: Also grab keyboard during XDnD grabs
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 18 Feb 2023 22:02:22 +0000 (23:02 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 18 Feb 2023 22:02:22 +0000 (23:02 +0100)
The drag source must handle events and messaging, this also
includes keyboard handling for accessibility and cancellation.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5604
gdk/x11/gdkdrag-x11.c

index 7a58f690ae87804be9a1f522919243d3a59024f4..49e23787d98d2d228a87c7ba4f63662de5012068 100644 (file)
@@ -1912,7 +1912,7 @@ drag_grab (GdkDrag *drag)
   root = GDK_DISPLAY_XROOTWIN (display);
   seat = gdk_device_get_seat (gdk_drag_get_device (drag));
 
-  capabilities = GDK_SEAT_CAPABILITY_ALL_POINTING;
+  capabilities = GDK_SEAT_CAPABILITY_ALL_POINTING | GDK_SEAT_CAPABILITY_KEYBOARD;
 
   cursor = gdk_drag_get_cursor (drag, x11_drag->current_action);
   g_set_object (&x11_drag->cursor, cursor);