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.
This commit is contained in:
sankalp committed 2026-06-17 03:18:06 +05:45
1 parent bffedbe3ae
commit fa2c157663
1 file changed
+3 -2
+3 -2
View File
@@ -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