summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-26 13:40:41 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-26 14:02:51 -0500
commit3dbca39f98288580c62a43c179ac11621433ec88 (patch)
treea7e1c1247752f91b2e2767cd62f796f15ab78010
parent3e94be5d73256a7f5c02d3a9474173226be7beff (diff)
efl: move signal events from efl.loop to efl.app
these are process-wide and not loop-specific
-rw-r--r--src/lib/ecore/ecore_signal.c18
-rw-r--r--src/lib/ecore/efl_app.eo5
-rw-r--r--src/lib/ecore/efl_loop.eo3
3 files changed, 11 insertions, 15 deletions
diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c
index 98934e63b3..40a1b58eb6 100644
--- a/src/lib/ecore/ecore_signal.c
+++ b/src/lib/ecore/ecore_signal.c
@@ -46,7 +46,7 @@ typedef struct _Signal_Data
46} Signal_Data; 46} Signal_Data;
47 47
48static Eina_Bool 48static Eina_Bool
49_ecore_signal_pipe_read(Eo *obj) 49_ecore_signal_pipe_read(Eo *obj EINA_UNUSED)
50{ 50{
51 Signal_Data sdata; 51 Signal_Data sdata;
52 int ret; 52 int ret;
@@ -74,14 +74,10 @@ _ecore_signal_pipe_read(Eo *obj)
74 ecore_event_add(ECORE_EVENT_SIGNAL_USER, e, 74 ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
75 _ecore_signal_generic_free, NULL); 75 _ecore_signal_generic_free, NULL);
76 } 76 }
77 Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS); 77 if (sdata.sig == SIGUSR1)
78 if (loop) 78 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_USR1, NULL);
79 { 79 else
80 if (sdata.sig == SIGUSR1) 80 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_USR2, NULL);
81 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR1, NULL);
82 else
83 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR2, NULL);
84 }
85 } 81 }
86 break; 82 break;
87 case SIGHUP: 83 case SIGHUP:
@@ -93,9 +89,7 @@ _ecore_signal_pipe_read(Eo *obj)
93 ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e, 89 ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e,
94 _ecore_signal_generic_free, NULL); 90 _ecore_signal_generic_free, NULL);
95 } 91 }
96 Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS); 92 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_HUP, NULL);
97 if (loop)
98 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_HUP, NULL);
99 } 93 }
100 break; 94 break;
101 case SIGQUIT: 95 case SIGQUIT:
diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo
index 6411984b78..a913f8b4bf 100644
--- a/src/lib/ecore/efl_app.eo
+++ b/src/lib/ecore/efl_app.eo
@@ -38,6 +38,11 @@ class Efl.App (Efl.Object)
38 } 38 }
39 } 39 }
40 } 40 }
41 events {
42 signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]]
43 signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]]
44 signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]]
45 }
41 implements { 46 implements {
42 Efl.Object.constructor; 47 Efl.Object.constructor;
43 Efl.Object.destructor; 48 Efl.Object.destructor;
diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo
index e9bd12ef5c..d851750a02 100644
--- a/src/lib/ecore/efl_loop.eo
+++ b/src/lib/ecore/efl_loop.eo
@@ -124,9 +124,6 @@ class Efl.Loop (Efl.Task)
124 pause; [[Called when the window is not going be displayed for some time]] 124 pause; [[Called when the window is not going be displayed for some time]]
125 resume; [[Called before a window is rendered after a pause event]] 125 resume; [[Called before a window is rendered after a pause event]]
126 terminate; [[Called before starting the shutdown of Elementary]] 126 terminate; [[Called before starting the shutdown of Elementary]]
127 signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]]
128 signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]]
129 signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]]
130 } 127 }
131 implements { 128 implements {
132 Efl.Object.constructor; 129 Efl.Object.constructor;