summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-01-21 11:28:31 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-01-21 11:44:19 -0500
commit868ea0fb767a706a7b3016def4da592d38aed3e4 (patch)
tree3380184b77f009177572e00bee2cf42f61c5ff3d
parent0973acbd609e739e9c7dffee870b85b77c6f405d (diff)
check siginfo si_code to verify that SIGUSR2 comes from userdevs/devilhorns/drm_rotation
When VT switching away and back, the kernel uses SIGUSR1 and SIGUSR2 to notify us of a vt switch event. That same signal was being trapped here to toggle display of the 'fps' window. If we check the signal's si_code, we can tell if this signal came from the kernel (as in vt switch) or from the user (as is sent in 'kill'). This fixes the issue of VT-switching back and forth under DRM would cause the compositor 'fps' display to appear. Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/bin/e_comp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 9facdd057..4bce85d22 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -817,6 +817,12 @@ _e_comp_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Event_Key *
817static Eina_Bool 817static Eina_Bool
818_e_comp_signal_user(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Event_Signal_User *ev) 818_e_comp_signal_user(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Event_Signal_User *ev)
819{ 819{
820 siginfo_t sig;
821
822 sig = ev->data;
823 /* anything sent via 'kill' will set this code to SI_USER */
824 if (sig.si_code != SI_USER) return ECORE_CALLBACK_PASS_ON;
825
820 if (ev->number == 1) 826 if (ev->number == 1)
821 { 827 {
822 // e uses this to pop up config panel 828 // e uses this to pop up config panel