xwayland: Check for sigusr1 in event handler
authorChris Michael <cp.michael@samsung.com>
Fri, 5 Sep 2014 19:00:00 +0000 (15:00 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 26 Jun 2015 00:04:30 +0000 (20:04 -0400)
XWayland servers sends us SIGUSR1 when it has finished initializing,
so we should be checking the signal number when we get the event.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/xwayland/e_mod_main.c

index a6dc8bf..f1f6144 100644 (file)
@@ -243,8 +243,13 @@ fail:
 }
 
 static Eina_Bool 
-_cb_signal_event(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
+_cb_signal_event(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
 {
+   Ecore_Event_Signal_User *ev;
+
+   ev = event;
+   if (ev->number != 1) return ECORE_CALLBACK_RENEW;
+
    /* NB: SIGUSR1 comes from XWayland Server when it has finished 
     * initialized. */