SIGUSR1 is used here to catch VT switching and either acquire or
release the VT. The problem is that XWayland Also sends SIGUSR1 when
it has finished initializing. In order to not get confused about where
the SIGUSR1 came from we can check the pid inside the siginfo
structure and see if it matches.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
{
Ecore_Drm_Device *dev;
Ecore_Event_Signal_User *ev;
+ siginfo_t sigdata;
dev = data;
ev = event;
- DBG("Caught user signal: %d", ev->number);
+ sigdata = ev->data;
+ if (sigdata.si_pid != getpid()) return ECORE_CALLBACK_RENEW;
if (ev->number == 1)
{
ERR("Could not acquire VT: %m");
}
- return EINA_TRUE;
+ return ECORE_CALLBACK_RENEW;
}
static Eina_Bool