esc does not cancel drag-and-drop operation on X11
Steps to reproduce
- open
gtk4-demo
- start the "Drag-and-Drop" example
- start dragging one of the rectangles
- press esc
Current behavior
The drag is cancelled on Wayland, but on X11.
Expected outcome
The drag is cancelled on both Wayland and X11.
Version information
- GTK: e51fa8b6
- gnome-shell: 43.3
- mutter: 43.3
- X.Org X Server: 1.21.1.7
Additional information
As far as I see, the code is there to handle this: gdkdrag-x11.c:gdk_dnd_handle_key_event()
. However, when the drag is in progress and esc is pressed no GDK_KEY_PRESS
events are generated, only GDK_FOCUS_CHANGE
. The same applies to space, enter. When I press a letter, however, then the key press events are generated (caps lock, shift, ctrl, and many others also generate key press events).
Edited by Barnabás Pőcze