mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
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.
This commit is contained in:
parent
32193c7e4d
commit
3a888163a0
3 changed files with 81 additions and 55 deletions
|
|
@ -166,6 +166,9 @@ void seat_begin_resize_floating(struct sway_seat *seat,
|
|||
void seat_begin_resize_tiling(struct sway_seat *seat,
|
||||
struct sway_container *con, uint32_t button, enum wlr_edges edge);
|
||||
|
||||
struct sway_container *seat_get_focus_inactive_floating(struct sway_seat *seat,
|
||||
struct sway_container *container);
|
||||
|
||||
void seat_end_mouse_operation(struct sway_seat *seat);
|
||||
|
||||
void seat_pointer_notify_button(struct sway_seat *seat, uint32_t time_msec,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue