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:
1 file changed
+5
@@ -1234,6 +1234,11 @@ class ModusNoti(Window):
|
|||||||
self.notifications.queue_resize()
|
self.notifications.queue_resize()
|
||||||
|
|
||||||
def start_animation():
|
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():
|
if new_box.get_parent() and new_box.get_realized():
|
||||||
new_box.reveal()
|
new_box.reveal()
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in new issue
Block a user