This commit is contained in:
vaxerski 2022-07-20 23:47:49 +02:00
parent 44b4a4541e
commit 40cb245f46
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ struct SLayerSurface {
DYNLISTENER(commitLayerSurface);
DYNLISTENER(newPopup);
wlr_box geometry;
wlr_box geometry = {0,0,0,0};
Vector2D position;
zwlr_layer_shell_v1_layer layer;

View file

@ -581,13 +581,13 @@ void CHyprRenderer::arrangeLayerArray(SMonitor* pMonitor, const std::list<SLayer
continue;
}
// Apply
bool changed = ls->geometry.width == box.width && ls->geometry.height == box.height;
bool same = ls->geometry.width == box.width && ls->geometry.height == box.height;
ls->geometry = box;
apply_exclusive(usableArea, PSTATE->anchor, PSTATE->exclusive_zone, PSTATE->margin.top, PSTATE->margin.right, PSTATE->margin.bottom, PSTATE->margin.left);
if (changed)
if (!same)
wlr_layer_surface_v1_configure(ls->layerSurface, box.width, box.height);
Debug::log(LOG, "LayerSurface %x arranged: x: %i y: %i w: %i h: %i with margins: t: %i l: %i r: %i b: %i", &ls, box.x, box.y, box.width, box.height, PSTATE->margin.top, PSTATE->margin.left, PSTATE->margin.right, PSTATE->margin.bottom);