aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Webster <miketwebster@gmail.com>2017-06-20 12:17:49 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-20 12:17:49 +0200
commitae3875242f1d42e895902769810473d7819169d1 (patch)
tree9076a3aa29433c3db9bb9a84dc2657c61c68cf95 /src
parentd68171ebaceaa1b6ead605e9cd5bb68c680ccd8a (diff)
downloadarctica-greeter-ae3875242f1d42e895902769810473d7819169d1.tar.gz
arctica-greeter-ae3875242f1d42e895902769810473d7819169d1.tar.bz2
arctica-greeter-ae3875242f1d42e895902769810473d7819169d1.zip
src/arctica-greeter.vala: Disconnect the event filter when the main window is destroyed.
Otherwise we can continue to receive events on the filter when we no longer have a backing GdkWindow to act upon (causing a segfault).
Diffstat (limited to 'src')
-rw-r--r--src/arctica-greeter.vala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index dc574b5..a964588 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -426,6 +426,12 @@ public class ArcticaGreeter
root.add_filter (focus_upon_map);
}
+ private void kill_fake_wm ()
+ {
+ var root = Gdk.get_default_root_window ();
+ root.remove_filter (focus_upon_map);
+ }
+
private static Cairo.XlibSurface? create_root_surface (Gdk.Screen screen)
{
var visual = screen.get_system_visual ();
@@ -503,6 +509,13 @@ public class ArcticaGreeter
main_window = new MainWindow ();
+ main_window.destroy.connect(() => { kill_fake_wm (); });
+ main_window.delete_event.connect(() =>
+ {
+ Gtk.main_quit();
+ return false;
+ });
+
Bus.own_name (BusType.SESSION, "org.ayatana.Greeter", BusNameOwnerFlags.NONE);
dbus_object = new DialogDBusInterface ();