mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
Add output wrapping
This fixes issue #733. Now if the user focuses output right but is at the rightmost monitor, the focus will wrap the the leftmost monitor. This commit adds a new function, swayc_opposite_output, which selects the opposite output given a position and a direction. Now, when calling output_by_name, we first check if there is an adjacent output to switch to. If that fails, we call swayc_opposite_output to handle wrapping.
This commit is contained in:
parent
c1e6cc3257
commit
eda4bad725
2 changed files with 72 additions and 5 deletions
|
|
@ -7,6 +7,7 @@
|
|||
// Position is absolute coordinates on the edge where the adjacent output
|
||||
// should be searched for.
|
||||
swayc_t *output_by_name(const char* name, const struct wlc_point *abs_pos);
|
||||
swayc_t *swayc_opposite_output(enum movement_direction dir, const struct wlc_point *abs_pos);
|
||||
swayc_t *swayc_adjacent_output(swayc_t *output, enum movement_direction dir, const struct wlc_point *abs_pos, bool pick_closest);
|
||||
|
||||
// Place absolute coordinates for given container into given wlc_point.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue