[Xfce4-commits] <xfce4-panel:master> Panel: Avoid recursing gtk_main_quit() on signal.

Nick Schermer noreply at xfce.org
Sun Mar 27 12:40:01 CEST 2011


Updating branch refs/heads/master
         to 8af0d7e284670e24da47d8f1e96e5f35a7e445d8 (commit)
       from 9081940f4049d9884a6af417f471240922a125cf (commit)

commit 8af0d7e284670e24da47d8f1e96e5f35a7e445d8
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Mar 27 12:17:21 2011 +0200

    Panel: Avoid recursing gtk_main_quit() on signal.

 panel/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/panel/main.c b/panel/main.c
index 67ad6a2..76c851a 100644
--- a/panel/main.c
+++ b/panel/main.c
@@ -121,6 +121,14 @@ panel_callback_handler (const gchar  *name,
 static void
 panel_signal_handler (gint signum)
 {
+  static gboolean was_triggered = FALSE;
+
+  /* avoid recursing this handler if we receive a
+   * signal before the mainloop is started */
+  if (was_triggered)
+    return;
+  was_triggered = TRUE;
+
   panel_debug (PANEL_DEBUG_MAIN,
                "received signal %s <%d>, %s panel",
                g_strsignal (signum), signum,



More information about the Xfce4-commits mailing list