aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-17 17:32:53 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-17 17:32:53 +1000
commit3a888163a03e8fb6fbe91bfe8e2fe4f3d2f03cec (patch)
tree56dff4af22bf816ab5ec024f694d41ef3275d48e /include/sway/input/seat.h
parentMerge pull request #2465 from DonnieWest/master (diff)
downloadsway-3a888163a03e8fb6fbe91bfe8e2fe4f3d2f03cec.tar.gz
sway-3a888163a03e8fb6fbe91bfe8e2fe4f3d2f03cec.tar.zst
sway-3a888163a03e8fb6fbe91bfe8e2fe4f3d2f03cec.zip
Refactor seat_get_focus functions
Fixes #2467. This commit introduces seat_get_focus_inactive_floating to supplement seat_get_focus_inactive_tiling, and uses it during `focus mode_toggle` which fixes a focus bug. This also refactors the seat_get_focus_inactive functions so that they do their selection logic themselves rather than offloading it to seat_get_focus_by_type which was getting bloated. seat_get_focus_by_type is now removed. Lastly, this commit changes seat_get_focus to just return the first container in the focus stack rather than looping and calling seat_get_focus_by_type.
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r--include/sway/input/seat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index eb4202f3..9dfb0714 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -166,6 +166,9 @@ void seat_begin_resize_floating(struct sway_seat *seat,
166void seat_begin_resize_tiling(struct sway_seat *seat, 166void seat_begin_resize_tiling(struct sway_seat *seat,
167 struct sway_container *con, uint32_t button, enum wlr_edges edge); 167 struct sway_container *con, uint32_t button, enum wlr_edges edge);
168 168
169struct sway_container *seat_get_focus_inactive_floating(struct sway_seat *seat,
170 struct sway_container *container);
171
169void seat_end_mouse_operation(struct sway_seat *seat); 172void seat_end_mouse_operation(struct sway_seat *seat);
170 173
171void seat_pointer_notify_button(struct sway_seat *seat, uint32_t time_msec, 174void seat_pointer_notify_button(struct sway_seat *seat, uint32_t time_msec,