From fa2c1576630cd2235433f9f92b7a9b980d2b4a6d Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Wed, 17 Jun 2026 03:18:06 +0545 Subject: [PATCH] fix(src/shared/window): fix window visibility check and margin duplication Fixes logic error causing popup window to be created when invisible and prevents redundant margin updates. --- src/shared/window/popup_win.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared/window/popup_win.py b/src/shared/window/popup_win.py index 61f8f9d..603fd24 100644 --- a/src/shared/window/popup_win.py +++ b/src/shared/window/popup_win.py @@ -89,7 +89,7 @@ class PopupWindow(WaylandWindow): return False def do_handle_size_allocate(self, *_): - if self.get_visible() and not self._initial_position: + if not self.get_visible(): return return self.do_reposition(self.do_calculate_edges()) @@ -186,5 +186,6 @@ class PopupWindow(WaylandWindow): new_margin[3], ) - self.margin = new_margin + if tuple(self.margin) != tuple(new_margin): + self.margin = new_margin self._initial_position = False