refactor(src): lazy‑load Launcher and refine GlobalMenuService cache invalidation

Prevents premature instance creation and stale empty‑menu cache entries
This commit is contained in:
sankalp committed 2026-06-23 14:10:49 +05:45
1 parent 3d8b1b895e
commit d89b392a0e
5 files changed
+335 -202

No files matched your search

+3 -3
View File
@@ -49,12 +49,12 @@ class CapsLock(Service):
self._start_efficient_polling()
def _start_efficient_polling(self):
"""Start efficient polling with 100ms intervals."""
"""Start efficient polling with 500ms intervals."""
if self._timeout_id is None:
self._timeout_id = GLib.timeout_add(100, self._efficient_poll)
self._timeout_id = GLib.timeout_add(500, self._efficient_poll)
def _efficient_poll(self) -> bool:
"""Monitor CapsLock state with 100ms polling intervals.
"""Monitor CapsLock state with 500ms polling intervals.
Returns:
bool: True to continue polling, False to stop.