1
1
mirror of https://github.com/swaywm/sway synced 2024-10-01 05:51:19 +02:00

Fix minor bug with output positioning

This commit is contained in:
Drew DeVault 2015-08-22 15:21:56 -04:00
parent 07229edfe6
commit 1fd5962aeb

@ -362,12 +362,8 @@ swayc_t *get_swayc_in_direction(swayc_t *container, enum movement_direction dir)
} }
} }
} else if (dir == MOVE_LEFT) { } else if (dir == MOVE_LEFT) {
sway_log(L_DEBUG, "next->x: %d, next->width: %d, container->x: %d", if (container->x >= next->x + next->width) {
(int)next->x, (int)next->width, (int)container->x);
if (container->x > next->x + next->width) {
sway_log(L_DEBUG, "match");
if (target == -1 || max_x < next->x) { if (target == -1 || max_x < next->x) {
sway_log(L_DEBUG, "hit");
target = i; target = i;
max_x = next->x; max_x = next->x;
} }
@ -380,7 +376,7 @@ swayc_t *get_swayc_in_direction(swayc_t *container, enum movement_direction dir)
} }
} }
} else if (dir == MOVE_UP) { } else if (dir == MOVE_UP) {
if (container->y > next->y + next->height) { if (container->y >= next->y + next->height) {
if (target == -1 || max_y < next->y) { if (target == -1 || max_y < next->y) {
target = i; target = i;
max_y = next->y; max_y = next->y;