From 40cb245f463ab201638d2b76cb0d6ee7a1c0c6a6 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 20 Jul 2022 23:47:49 +0200 Subject: [PATCH] 14 --- src/helpers/WLClasses.hpp | 2 +- src/render/Renderer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index 768dcb45..8df11bcd 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -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; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 96c72da6..a5bf1a33 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -581,13 +581,13 @@ void CHyprRenderer::arrangeLayerArray(SMonitor* pMonitor, const std::listgeometry.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);