Commit 2083415e authored by Erik Reider's avatar Erik Reider

Fixed segfault when displaying notification + new monitor is mapped

parent 5228963a
......@@ -146,6 +146,7 @@ namespace SwayNotificationCenter {
notifications_widget = new Widgets.Notifications ();
control_center = new ControlCenter ();
add_window (floating_notifications);
add_window (control_center);
noti_daemon.on_dnd_toggle.connect ((dnd) => {
......
......@@ -46,11 +46,6 @@ namespace SwayNotificationCenter {
});
this.unmap.connect (() => {
debug ("NotificationWindow un-mapped");
// Destroy the wl_surface to get a new "enter-monitor" signal and
// fixes issues where keyboard shortcuts stop working after clearing
// all notifications.
((Gtk.Widget) this).unrealize ();
});
// TODO: Make option
......@@ -303,6 +298,13 @@ namespace SwayNotificationCenter {
}
}
if (!visible) {
// Destroy the wl_surface to get a new "enter-monitor" signal and
// fixes issues where keyboard shortcuts stop working after clearing
// all notifications.
((Gtk.Widget) this).unrealize ();
}
set_visible (true);
list.append.begin (noti);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment