← Back to team overview

elementaryart team mailing list archive

[Merge] lp:~pimvullers/granite/granite into lp:granite

 

Pim Vullers has proposed merging lp:~pimvullers/granite/granite into lp:granite.

Requested reviews:
  elementary Pantheon team (elementary-pantheon)
Related bugs:
  Bug #956416 in Granite: "segmentation fault on SIGINT"
  https://bugs.launchpad.net/granite/+bug/956416

For more details, see:
https://code.launchpad.net/~pimvullers/granite/granite/+merge/97919

Improved the sig_handler() implementation to actually terminate applications (like slingshot) and avoid errors (if there is no gtk main loop).
-- 
https://code.launchpad.net/~pimvullers/granite/granite/+merge/97919
Your team elementaryart (old) is subscribed to branch lp:granite.
=== modified file 'lib/Application.vala'
--- lib/Application.vala	2012-03-16 15:52:01 +0000
+++ lib/Application.vala	2012-03-16 16:31:31 +0000
@@ -112,7 +112,12 @@
 
         protected static void sig_handler (int sig) {
             warning ("Caught signal (%d), exiting", sig);
-            Gtk.main_quit ();
+            foreach (Gtk.Window window in Granite.app.get_windows()) {
+                window.destroy();
+            }
+            if (Gtk.main_level () > 0) {
+                Gtk.main_quit ();
+            }
         }
 
         protected virtual void set_options () {


Follow ups