From b11e5e41f45442d237efec74f2933038fdf6b97f Mon Sep 17 00:00:00 2001 From: George Sladkovsky Date: Sat, 25 Jan 2025 10:54:24 +0100 Subject: [PATCH] fix(widget/glazewm): brief window popup fixed The brief window popup during YASB startup was fixed. It was a "setVisible(True)" call that was made before the "GlazeWM Offline" label was added to the layout that caused this. Also tidied up some visibility logic for glazewm offline label. --- src/core/widgets/glazewm/workspaces.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/widgets/glazewm/workspaces.py b/src/core/widgets/glazewm/workspaces.py index 576dcf7..70d224b 100644 --- a/src/core/widgets/glazewm/workspaces.py +++ b/src/core/widgets/glazewm/workspaces.py @@ -123,11 +123,12 @@ def __init__( self.offline_text = QLabel(self.label_offline) self.offline_text.setProperty("class", "offline-status") - self.offline_text.setVisible(True) self.widget_layout.addWidget(self.offline_text) self.widget_layout.addWidget(self.workspace_container) + self.offline_text.setVisible(True) + self.monitor_hwnd = get_monitor_hwnd(int(QWidget.winId(self))) self.glazewm_client = GlazewmClient( @@ -143,8 +144,7 @@ def __init__( def _update_connection_status(self, status: bool): self.workspace_container.setVisible(status) - self.offline_text.setVisible(not status) - self.setVisible(status if self.hide_if_offline else True) + self.offline_text.setVisible(not status if not self.hide_if_offline else False) def _update_workspaces(self, message: list[Monitor]): # Find the target monitor