From 476ed7e4fb66310f35f7746931fe8893f48f5cfa Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sat, 18 Jul 2026 14:12:44 +0545 Subject: [PATCH] fix(workspace): replace broken _config_handlers import with off_config_change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same silent ImportError leak as panel/main.py — callbacks were never unregistered on widget destroy. --- src/window/panel/components/workspace.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/window/panel/components/workspace.py b/src/window/panel/components/workspace.py index 74b07cc..791efc6 100644 --- a/src/window/panel/components/workspace.py +++ b/src/window/panel/components/workspace.py @@ -2,7 +2,7 @@ from fabric.hyprland.widgets import HyprlandWorkspaces, WorkspaceButton from fabric.utils import logger from fabric.widgets.box import Box -from services.config import get_config, on_config_change +from services.config import get_config, off_config_change, on_config_change from utils.functions import is_special_workspace_id from utils.gtk_utils import setup_cursor_hover @@ -102,10 +102,7 @@ class WorkspaceIndicator(Box): def destroy(self): try: - from services.config import _config_handlers - - if self._on_config_changed in _config_handlers: - _config_handlers.remove(self._on_config_changed) + off_config_change(self._on_config_changed) except Exception as e: logger.error(f"An error occurred: {e}") if hasattr(self, "workspaces") and self.workspaces: