mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-10-05 21:08:40 +03:00
Fix notification replacement not always visible
This commit is contained in:
parent
36c62c8a10
commit
a72ba2e8fa
@ -4,7 +4,9 @@ namespace SwayNotificatonCenter {
|
||||
|
||||
private unowned NotificationWindow notificationWindow {
|
||||
get {
|
||||
if (!notis.get_realized ()) notis = new NotificationWindow ();
|
||||
if (!notis.get_realized () || notis.closed) {
|
||||
notis = new NotificationWindow ();
|
||||
}
|
||||
return notis;
|
||||
}
|
||||
}
|
||||
@ -39,6 +41,8 @@ namespace SwayNotificatonCenter {
|
||||
|
||||
private double last_upper = 0;
|
||||
|
||||
public bool closed = false;
|
||||
|
||||
public NotificationWindow () {
|
||||
GtkLayerShell.init_for_window (this);
|
||||
GtkLayerShell.set_layer (this, GtkLayerShell.Layer.OVERLAY);
|
||||
@ -125,7 +129,10 @@ namespace SwayNotificatonCenter {
|
||||
}
|
||||
|
||||
if (!this.get_realized ()) return;
|
||||
if (box.get_children ().length () == 0) this.close ();
|
||||
if (box.get_children ().length () == 0) {
|
||||
this.closed = true;
|
||||
this.close ();
|
||||
}
|
||||
}
|
||||
|
||||
public void add_notification (NotifyParams param,
|
||||
|
Loading…
Reference in New Issue
Block a user