path: root/src/lib/elementary/elm_systray.c
diff options
authorJean-Philippe Andre <>2017-12-19 11:14:37 +0900
committerJean-Philippe Andre <>2017-12-19 11:14:37 +0900
commitff24ac2d6ddaafba49ae5100f17fe37e5d874140 (patch)
treeb98881dd9ccb98896bbc8784a91e6b61a7403b41 /src/lib/elementary/elm_systray.c
parent47bf356435d7b4562e64f45ef59dbf190dff16c7 (diff)
efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would become invalid, since they are now stored in a dynamic array rather than a statically stored array. The risk here is that if a module of EFL tends to init/shutdown in a "normal" scenario then the event type array will grow in a leaking manner. This could be fixed by resetting those event ID's only when the loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using EFL_EVENT_DEL in this patch as this would add too many event callbacks to the main loop object, which may result in slightly slower event calls to it, affecting the overall performance.
Diffstat (limited to 'src/lib/elementary/elm_systray.c')
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_systray.c b/src/lib/elementary/elm_systray.c
index fadd7a29f0..bcc8c0a2e5 100644
--- a/src/lib/elementary/elm_systray.c
+++ b/src/lib/elementary/elm_systray.c
@@ -459,8 +459,7 @@ elm_need_systray(void)
459 459
460 if (!elm_need_eldbus()) return EINA_FALSE; 460 if (!elm_need_eldbus()) return EINA_FALSE;
461 461
462 if (!ELM_EVENT_SYSTRAY_READY) 462 ELM_EVENT_SYSTRAY_READY = ecore_event_type_new();
463 ELM_EVENT_SYSTRAY_READY = ecore_event_type_new();
464 463
465 if (!_elm_systray_watcher_init()) return EINA_FALSE; 464 if (!_elm_systray_watcher_init()) return EINA_FALSE;
466 465