mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 08:21:28 +00:00
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.
This commit is contained in:
parent
ce54b4ff2e
commit
f4b9c3856a
|
@ -398,10 +398,10 @@ void update_geometry(swayc_t *container) {
|
||||||
geometry.size.h = container->height - gap/2;
|
geometry.size.h = container->height - gap/2;
|
||||||
}
|
}
|
||||||
if (container->x + container->width + gap >= ws->x + ws->width) {
|
if (container->x + container->width + gap >= ws->x + ws->width) {
|
||||||
geometry.size.w = ws->width - geometry.origin.x;
|
geometry.size.w = ws->x + ws->width - geometry.origin.x;
|
||||||
}
|
}
|
||||||
if (container->y + container->height + gap >= ws->y + ws->height) {
|
if (container->y + container->height + gap >= ws->y + ws->height) {
|
||||||
geometry.size.h = ws->height - geometry.origin.y;
|
geometry.size.h = ws->y + ws->height - geometry.origin.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wlc_view_set_geometry(container->handle, 0, &geometry);
|
wlc_view_set_geometry(container->handle, 0, &geometry);
|
||||||
|
|
Loading…
Reference in a new issue