summaryrefslogtreecommitdiffstats
path: root/sway/layout.c
diff options
context:
space:
mode:
authorLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-12-20 21:21:08 +0100
committerLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-12-20 21:23:20 +0100
commitf4b9c3856a03ce51d8761c32da8bd0986680b534 (patch)
treead1c5b9bc9c53c213887284095305aea1814f80c /sway/layout.c
parentcontainer: Fix inner gaps against screen edge. (diff)
downloadsway-f4b9c3856a03ce51d8761c32da8bd0986680b534.tar.gz
sway-f4b9c3856a03ce51d8761c32da8bd0986680b534.tar.zst
sway-f4b9c3856a03ce51d8761c32da8bd0986680b534.zip
layout: Fix `edge_gaps off` with top/left panels.
Since x/y won't be zero when there's a top or left panel in place, we need to take those coordinates into account too.
Diffstat (limited to 'sway/layout.c')
-rw-r--r--sway/layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 6d82921c..a9e7c7f1 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -398,10 +398,10 @@ void update_geometry(swayc_t *container) {
398 geometry.size.h = container->height - gap/2; 398 geometry.size.h = container->height - gap/2;
399 } 399 }
400 if (container->x + container->width + gap >= ws->x + ws->width) { 400 if (container->x + container->width + gap >= ws->x + ws->width) {
401 geometry.size.w = ws->width - geometry.origin.x; 401 geometry.size.w = ws->x + ws->width - geometry.origin.x;
402 } 402 }
403 if (container->y + container->height + gap >= ws->y + ws->height) { 403 if (container->y + container->height + gap >= ws->y + ws->height) {
404 geometry.size.h = ws->height - geometry.origin.y; 404 geometry.size.h = ws->y + ws->height - geometry.origin.y;
405 } 405 }
406 } 406 }
407 wlc_view_set_geometry(container->handle, 0, &geometry); 407 wlc_view_set_geometry(container->handle, 0, &geometry);