From 8425092f18f2eb86daa9cf221510c06dc312e3b9 Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Mon, 22 Jan 2024 21:16:18 -0500 Subject: [PATCH] notification: Work around longstanding core Talon issue in which notification windows aren't returned sometimes. --- notification.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notification.py b/notification.py index 30af08d..07b14d0 100644 --- a/notification.py +++ b/notification.py @@ -211,7 +211,8 @@ def win_open(self, window): def notification_groups(self): ncui = ui.apps(pid=self.pid)[0] - for window in ncui.windows(): + # XXX(nriley) Would use ncui.windows() but sometimes Talon loses track of them + for window in ncui.element.children.find(AXRole="AXWindow", max_depth=0): for group in window.children.find(AXRole="AXGroup"): if not (identifier := Notification.group_identifier(group)): continue