diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-22 15:21:56 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-22 15:21:56 -0400 |
commit | 1fd5962aeb5bab722a26182ad39fddecf43c6f95 (patch) | |
tree | 614cca20e3e136a9124cc0cb54d9d4df9bac8402 | |
parent | Implement output positioning (diff) | |
download | sway-1fd5962aeb5bab722a26182ad39fddecf43c6f95.tar.gz sway-1fd5962aeb5bab722a26182ad39fddecf43c6f95.tar.zst sway-1fd5962aeb5bab722a26182ad39fddecf43c6f95.zip |
Fix minor bug with output positioning
-rw-r--r-- | sway/layout.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sway/layout.c b/sway/layout.c index 7a7ccc0e..035fea34 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -362,12 +362,8 @@ swayc_t *get_swayc_in_direction(swayc_t *container, enum movement_direction dir) | |||
362 | } | 362 | } |
363 | } | 363 | } |
364 | } else if (dir == MOVE_LEFT) { | 364 | } else if (dir == MOVE_LEFT) { |
365 | sway_log(L_DEBUG, "next->x: %d, next->width: %d, container->x: %d", | 365 | if (container->x >= next->x + next->width) { |
366 | (int)next->x, (int)next->width, (int)container->x); | ||
367 | if (container->x > next->x + next->width) { | ||
368 | sway_log(L_DEBUG, "match"); | ||
369 | if (target == -1 || max_x < next->x) { | 366 | if (target == -1 || max_x < next->x) { |
370 | sway_log(L_DEBUG, "hit"); | ||
371 | target = i; | 367 | target = i; |
372 | max_x = next->x; | 368 | max_x = next->x; |
373 | } | 369 | } |
@@ -380,7 +376,7 @@ swayc_t *get_swayc_in_direction(swayc_t *container, enum movement_direction dir) | |||
380 | } | 376 | } |
381 | } | 377 | } |
382 | } else if (dir == MOVE_UP) { | 378 | } else if (dir == MOVE_UP) { |
383 | if (container->y > next->y + next->height) { | 379 | if (container->y >= next->y + next->height) { |
384 | if (target == -1 || max_y < next->y) { | 380 | if (target == -1 || max_y < next->y) { |
385 | target = i; | 381 | target = i; |
386 | max_y = next->y; | 382 | max_y = next->y; |