aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2020-06-28 15:33:03 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2020-06-30 13:27:51 +0200
commit492267a5d6924e4f3a2e2326240eb064c3d2d7c2 (patch)
tree148ca8c082dfb1971e2c7237bba1143c546bc860 /include
parenttransaction: Mark client resize immediately ready (diff)
downloadsway-492267a5d6924e4f3a2e2326240eb064c3d2d7c2.tar.gz
sway-492267a5d6924e4f3a2e2326240eb064c3d2d7c2.tar.zst
sway-492267a5d6924e4f3a2e2326240eb064c3d2d7c2.zip
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
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/seat.h6
1 files changed, 6 insertions, 0 deletions
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 {
64 struct wl_listener destroy; 64 struct wl_listener destroy;
65}; 65};
66 66
67struct sway_drag {
68 struct sway_seat *seat;
69 struct wlr_drag *wlr_drag;
70 struct wl_listener destroy;
71};
72
67struct sway_seat { 73struct sway_seat {
68 struct wlr_seat *wlr_seat; 74 struct wlr_seat *wlr_seat;
69 struct sway_cursor *cursor; 75 struct sway_cursor *cursor;