From 492267a5d6924e4f3a2e2326240eb064c3d2d7c2 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Sun, 28 Jun 2020 15:33:03 +0200 Subject: seat: Refocus seat when wlr_drag is destroyed wlr_drag installs grabs for the full duration of the drag, leading to the drag target not being focused when the drag ends. This leads to unexpected focus behavior, especially for the keyboard which requires toggling focus away and back to set. We can only fix the focus once the grabs are released, so refocus the seat when the wlr_drag destroy event is received. Closes: https://github.com/swaywm/sway/issues/5116 --- include/sway/input/seat.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/sway/input') diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index 37de1223..2256fff1 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h @@ -64,6 +64,12 @@ struct sway_drag_icon { struct wl_listener destroy; }; +struct sway_drag { + struct sway_seat *seat; + struct wlr_drag *wlr_drag; + struct wl_listener destroy; +}; + struct sway_seat { struct wlr_seat *wlr_seat; struct sway_cursor *cursor; -- cgit v1.2.3