diff options
author | Drew DeVault <[email protected]> | 2015-11-16 15:57:02 -0500 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2015-11-16 15:57:02 -0500 |
commit | 6850174049b9b8ffc00aac7051d82b3489bcc948 (patch) | |
tree | bdac5630c32099785a6eade4dfa8ceb04a3c11dd /sway/layout.c | |
parent | 95c65ee33ea05963e334555311414e0d834de4b7 (diff) | |
parent | 236f26f62e56cef8278d88f6111720b738d4a85f (diff) |
Merge pull request #233 from sce/multiple_adjacent_outputs
output: Support multiple adjacent outputs.
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c index fe7d820a..741addf1 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -533,13 +533,17 @@ swayc_t *get_swayc_in_direction_under(swayc_t *container, enum movement_directio return parent; } } + // If moving to an adjacent output we need a starting position (since this + // output might border to multiple outputs). + struct wlc_point abs_pos; + get_absolute_center_position(container, &abs_pos); while (true) { // Test if we can even make a difference here bool can_move = false; int diff = 0; if (parent->type == C_ROOT) { sway_log(L_DEBUG, "Moving between outputs"); - return swayc_adjacent_output(container, dir); + return swayc_adjacent_output(container, dir, &abs_pos, true); } else { if (dir == MOVE_LEFT || dir == MOVE_RIGHT) { if (parent->layout == L_HORIZ) { |