summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2.c
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_wl2/ecore_wl2.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 '')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2.c91
1 files changed, 44 insertions, 47 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index ba22eb1986..c309a92b37 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -90,53 +90,50 @@ ecore_wl2_init(void)
90 } 90 }
91 91
92 /* handle creating new Ecore_Wl2 event types */ 92 /* handle creating new Ecore_Wl2 event types */
93 if (!ECORE_WL2_EVENT_GLOBAL_ADDED) 93 ECORE_WL2_EVENT_CONNECT = ecore_event_type_new();
94 { 94 ECORE_WL2_EVENT_DISCONNECT = ecore_event_type_new();
95 ECORE_WL2_EVENT_CONNECT = ecore_event_type_new(); 95 ECORE_WL2_EVENT_GLOBAL_ADDED = ecore_event_type_new();
96 ECORE_WL2_EVENT_DISCONNECT = ecore_event_type_new(); 96 ECORE_WL2_EVENT_GLOBAL_REMOVED = ecore_event_type_new();
97 ECORE_WL2_EVENT_GLOBAL_ADDED = ecore_event_type_new(); 97 ECORE_WL2_EVENT_FOCUS_IN = ecore_event_type_new();
98 ECORE_WL2_EVENT_GLOBAL_REMOVED = ecore_event_type_new(); 98 ECORE_WL2_EVENT_FOCUS_OUT = ecore_event_type_new();
99 ECORE_WL2_EVENT_FOCUS_IN = ecore_event_type_new(); 99 ECORE_WL2_EVENT_DND_ENTER = ecore_event_type_new();
100 ECORE_WL2_EVENT_FOCUS_OUT = ecore_event_type_new(); 100 ECORE_WL2_EVENT_DND_LEAVE = ecore_event_type_new();
101 ECORE_WL2_EVENT_DND_ENTER = ecore_event_type_new(); 101 ECORE_WL2_EVENT_DND_MOTION = ecore_event_type_new();
102 ECORE_WL2_EVENT_DND_LEAVE = ecore_event_type_new(); 102 ECORE_WL2_EVENT_DND_DROP = ecore_event_type_new();
103 ECORE_WL2_EVENT_DND_MOTION = ecore_event_type_new(); 103 ECORE_WL2_EVENT_DND_END = ecore_event_type_new();
104 ECORE_WL2_EVENT_DND_DROP = ecore_event_type_new(); 104 ECORE_WL2_EVENT_DATA_SOURCE_END = ecore_event_type_new();
105 ECORE_WL2_EVENT_DND_END = ecore_event_type_new(); 105 ECORE_WL2_EVENT_DATA_SOURCE_DROP = ecore_event_type_new();
106 ECORE_WL2_EVENT_DATA_SOURCE_END = ecore_event_type_new(); 106 ECORE_WL2_EVENT_DATA_SOURCE_ACTION = ecore_event_type_new();
107 ECORE_WL2_EVENT_DATA_SOURCE_DROP = ecore_event_type_new(); 107 ECORE_WL2_EVENT_DATA_SOURCE_TARGET = ecore_event_type_new();
108 ECORE_WL2_EVENT_DATA_SOURCE_ACTION = ecore_event_type_new(); 108 ECORE_WL2_EVENT_DATA_SOURCE_SEND = ecore_event_type_new();
109 ECORE_WL2_EVENT_DATA_SOURCE_TARGET = ecore_event_type_new(); 109 ECORE_WL2_EVENT_WINDOW_CONFIGURE = ecore_event_type_new();
110 ECORE_WL2_EVENT_DATA_SOURCE_SEND = ecore_event_type_new(); 110 ECORE_WL2_EVENT_SYNC_DONE = ecore_event_type_new();
111 ECORE_WL2_EVENT_WINDOW_CONFIGURE = ecore_event_type_new(); 111 ECORE_WL2_EVENT_OFFER_DATA_READY = ecore_event_type_new();
112 ECORE_WL2_EVENT_SYNC_DONE = ecore_event_type_new(); 112 ECORE_WL2_EVENT_SEAT_NAME_CHANGED = ecore_event_type_new();
113 ECORE_WL2_EVENT_OFFER_DATA_READY = ecore_event_type_new(); 113 ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = ecore_event_type_new();
114 ECORE_WL2_EVENT_SEAT_NAME_CHANGED = ecore_event_type_new(); 114 ECORE_WL2_EVENT_DEVICE_ADDED = ecore_event_type_new();
115 ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = ecore_event_type_new(); 115 ECORE_WL2_EVENT_DEVICE_REMOVED = ecore_event_type_new();
116 ECORE_WL2_EVENT_DEVICE_ADDED = ecore_event_type_new(); 116 _ecore_wl2_event_window_www = ecore_event_type_new();
117 ECORE_WL2_EVENT_DEVICE_REMOVED = ecore_event_type_new(); 117 _ecore_wl2_event_window_www_drag = ecore_event_type_new();
118 _ecore_wl2_event_window_www = ecore_event_type_new(); 118 ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE = ecore_event_type_new();
119 _ecore_wl2_event_window_www_drag = ecore_event_type_new(); 119 ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED = ecore_event_type_new();
120 ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE = ecore_event_type_new(); 120 ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED = ecore_event_type_new();
121 ECORE_WL2_EVENT_SEAT_KEYMAP_CHANGED = ecore_event_type_new(); 121 ECORE_WL2_EVENT_SEAT_SELECTION = ecore_event_type_new();
122 ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED = ecore_event_type_new(); 122 ECORE_WL2_EVENT_OUTPUT_TRANSFORM = ecore_event_type_new();
123 ECORE_WL2_EVENT_SEAT_SELECTION = ecore_event_type_new(); 123 ECORE_WL2_EVENT_WINDOW_ROTATE = ecore_event_type_new();
124 ECORE_WL2_EVENT_OUTPUT_TRANSFORM = ecore_event_type_new(); 124 ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = ecore_event_type_new();
125 ECORE_WL2_EVENT_WINDOW_ROTATE = ecore_event_type_new(); 125 ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE = ecore_event_type_new();
126 ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = ecore_event_type_new(); 126 ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_REQUEST = ecore_event_type_new();
127 ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE = 127 ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_DONE = ecore_event_type_new();
128 ecore_event_type_new(); 128 ECORE_WL2_EVENT_AUX_HINT_ALLOWED = ecore_event_type_new();
129 ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_REQUEST = ecore_event_type_new(); 129 ECORE_WL2_EVENT_AUX_HINT_SUPPORTED = ecore_event_type_new();
130 ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_DONE = ecore_event_type_new(); 130 ECORE_WL2_EVENT_AUX_MESSAGE = ecore_event_type_new();
131 ECORE_WL2_EVENT_AUX_HINT_ALLOWED = ecore_event_type_new(); 131 ECORE_WL2_EVENT_WINDOW_SHOW = ecore_event_type_new();
132 ECORE_WL2_EVENT_AUX_HINT_SUPPORTED = ecore_event_type_new(); 132 ECORE_WL2_EVENT_WINDOW_HIDE = ecore_event_type_new();
133 ECORE_WL2_EVENT_AUX_MESSAGE = ecore_event_type_new(); 133 ECORE_WL2_EVENT_WINDOW_ACTIVATE = ecore_event_type_new();
134 ECORE_WL2_EVENT_WINDOW_SHOW = ecore_event_type_new(); 134 ECORE_WL2_EVENT_WINDOW_DEACTIVATE = ecore_event_type_new();
135 ECORE_WL2_EVENT_WINDOW_HIDE = ecore_event_type_new(); 135 ECORE_WL2_EVENT_WINDOW_ICONIFY_STATE_CHANGE = ecore_event_type_new();
136 ECORE_WL2_EVENT_WINDOW_ACTIVATE = ecore_event_type_new(); 136
137 ECORE_WL2_EVENT_WINDOW_DEACTIVATE = ecore_event_type_new();
138 ECORE_WL2_EVENT_WINDOW_ICONIFY_STATE_CHANGE = ecore_event_type_new();
139 }
140 if (!no_session_recovery) 137 if (!no_session_recovery)
141 no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY"); 138 no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
142 139