fix: disconnect signals and config callbacks on destroy

- dock/main.py: off_config_change in destroy()
- switcher/main.py: add destroy() for capture signals + config
- panel/main.py: disconnect fullscreen-changed signal
- notification_center.py: add destroy() for 4 notification signals
This commit is contained in:
sankalp committed 2026-07-31 01:37:16 +05:45
1 parent beab79a405
commit 3c93ac1c20
4 files changed
+25

No files matched your search

+11
View File
@@ -578,6 +578,17 @@ class ApplicationSwitcher(Window):
except Exception:
logger.exception("_on_frame_ready error")
def destroy(self) -> None:
from services.config import off_config_change
off_config_change(self._on_config_changed)
try:
self._capture.disconnect_by_func(self._on_frame_ready)
self._capture.disconnect_by_func(self._on_frame_failed)
except Exception:
pass
super().destroy()
def _on_frame_failed(self, _capture, addr, reason):
full_addr = addr if addr.startswith("0x") else f"0x{addr}"
logger.debug(f"AppCapture frame-failed for {full_addr}: {reason}")