Fixed notification trying to remove itself when the window is null
This commit is contained in:
@@ -86,6 +86,7 @@ namespace SwayNotificatonCenter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void remove_notification (Notification noti) {
|
private void remove_notification (Notification noti) {
|
||||||
|
if (_noti_window == null) return;
|
||||||
if (box.get_children ().index (noti) >= 0) {
|
if (box.get_children ().index (noti) >= 0) {
|
||||||
if (noti != null) box.remove (noti);
|
if (noti != null) box.remove (noti);
|
||||||
}
|
}
|
||||||
@@ -93,7 +94,6 @@ namespace SwayNotificatonCenter {
|
|||||||
// Hack to close and recreate the window
|
// Hack to close and recreate the window
|
||||||
// Fixes notifications enter_notify_event still being active
|
// Fixes notifications enter_notify_event still being active
|
||||||
// when closed
|
// when closed
|
||||||
if (_noti_window == null) return;
|
|
||||||
this.close ();
|
this.close ();
|
||||||
this.destroy ();
|
this.destroy ();
|
||||||
this.dispose ();
|
this.dispose ();
|
||||||
|
Reference in New Issue
Block a user