fix(src/window/notification): stop polling when revealer is closing/destroyed

The callback may execute after _on_notification_finished has fired, causing errors.
This commit is contained in:
sankalp committed 2026-07-16 12:13:19 +05:45
1 parent 83af1829c4
commit 41cb9afa07
1 file changed
+5
+5
View File
@@ -1234,6 +1234,11 @@ class ModusNoti(Window):
self.notifications.queue_resize()
def start_animation():
# Stop polling if the revealer is already closing/destroyed —
# _on_notification_finished may have fired between the idle_add
# and this callback executing.
if new_box._is_closing:
return False
if new_box.get_parent() and new_box.get_realized():
new_box.reveal()
return False