summaryrefslogtreecommitdiff
path: root/src/lib/ecore_win32
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-19 11:14:37 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-19 11:14:37 +0900
commitff24ac2d6ddaafba49ae5100f17fe37e5d874140 (patch)
treeb98881dd9ccb98896bbc8784a91e6b61a7403b41 /src/lib/ecore_win32
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/ecore_win32')
-rw-r--r--src/lib/ecore_win32/ecore_win32.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/lib/ecore_win32/ecore_win32.c b/src/lib/ecore_win32/ecore_win32.c
index c207f0b2ca..ec9738ee1b 100644
--- a/src/lib/ecore_win32/ecore_win32.c
+++ b/src/lib/ecore_win32/ecore_win32.c
@@ -570,24 +570,21 @@ ecore_win32_init()
570 goto unregister_class; 570 goto unregister_class;
571 } 571 }
572 572
573 if (!ECORE_WIN32_EVENT_MOUSE_IN) 573 ECORE_WIN32_EVENT_MOUSE_IN = ecore_event_type_new();
574 { 574 ECORE_WIN32_EVENT_MOUSE_OUT = ecore_event_type_new();
575 ECORE_WIN32_EVENT_MOUSE_IN = ecore_event_type_new(); 575 ECORE_WIN32_EVENT_WINDOW_FOCUS_IN = ecore_event_type_new();
576 ECORE_WIN32_EVENT_MOUSE_OUT = ecore_event_type_new(); 576 ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT = ecore_event_type_new();
577 ECORE_WIN32_EVENT_WINDOW_FOCUS_IN = ecore_event_type_new(); 577 ECORE_WIN32_EVENT_WINDOW_DAMAGE = ecore_event_type_new();
578 ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT = ecore_event_type_new(); 578 ECORE_WIN32_EVENT_WINDOW_CREATE = ecore_event_type_new();
579 ECORE_WIN32_EVENT_WINDOW_DAMAGE = ecore_event_type_new(); 579 ECORE_WIN32_EVENT_WINDOW_DESTROY = ecore_event_type_new();
580 ECORE_WIN32_EVENT_WINDOW_CREATE = ecore_event_type_new(); 580 ECORE_WIN32_EVENT_WINDOW_SHOW = ecore_event_type_new();
581 ECORE_WIN32_EVENT_WINDOW_DESTROY = ecore_event_type_new(); 581 ECORE_WIN32_EVENT_WINDOW_HIDE = ecore_event_type_new();
582 ECORE_WIN32_EVENT_WINDOW_SHOW = ecore_event_type_new(); 582 ECORE_WIN32_EVENT_WINDOW_CONFIGURE = ecore_event_type_new();
583 ECORE_WIN32_EVENT_WINDOW_HIDE = ecore_event_type_new(); 583 ECORE_WIN32_EVENT_WINDOW_RESIZE = ecore_event_type_new();
584 ECORE_WIN32_EVENT_WINDOW_CONFIGURE = ecore_event_type_new(); 584 ECORE_WIN32_EVENT_WINDOW_PROPERTY = ecore_event_type_new();
585 ECORE_WIN32_EVENT_WINDOW_RESIZE = ecore_event_type_new(); 585 ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
586 ECORE_WIN32_EVENT_WINDOW_PROPERTY = ecore_event_type_new(); 586 ECORE_WIN32_EVENT_SELECTION_CLEAR = ecore_event_type_new();
587 ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new(); 587 ECORE_WIN32_EVENT_SELECTION_NOTIFY = ecore_event_type_new();
588 ECORE_WIN32_EVENT_SELECTION_CLEAR = ecore_event_type_new();
589 ECORE_WIN32_EVENT_SELECTION_NOTIFY = ecore_event_type_new();
590 }
591 588
592 for (i = 0; i < 77; i++) 589 for (i = 0; i < 77; i++)
593 _ecore_win32_cursor_x[i] = _ecore_win32_cursor_x11_shaped_new(i); 590 _ecore_win32_cursor_x[i] = _ecore_win32_cursor_x11_shaped_new(i);