From de98fb29da43de0d3f7caad5bcf8fa1293353ad1 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 2 Sep 2019 15:47:58 +0200 Subject: [PATCH] wayland/data-device: Restore keyboard focus on drag end When starting a DnD operation, mutter would remove keyboard focus from the client, only to restore it on the data offer destroy. However, if the DnD fail, the keyboard focus is not restored, leaving the user unable to type in the focused window, even after clicking in the window. That issue would show only on first attempt, as further DnD attempts would destroy the previous data offer which would also restore the keyboard focus. Make sure we restore the keyboard focus on drag end as well. https://gitlab.gnome.org/GNOME/mutter/issues/747 --- src/wayland/meta-wayland-data-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index 16fec6437..2ca77e8ea 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -977,6 +977,7 @@ data_device_end_drag_grab (MetaWaylandDragGrab *drag_grab) { meta_wayland_pointer_end_grab (drag_grab->generic.pointer); meta_wayland_keyboard_end_grab (drag_grab->keyboard_grab.keyboard); + meta_display_sync_wayland_input_focus (meta_get_display ()); } g_slice_free (MetaWaylandDragGrab, drag_grab);