ecore_cocoa: avoid crash during shutdown due to Ecore_Event queue.
authorCedric BAIL <cedric@osg.samsung.com>
Fri, 10 Mar 2017 00:10:22 +0000 (16:10 -0800)
committerCedric BAIL <cedric@osg.samsung.com>
Fri, 10 Mar 2017 00:17:58 +0000 (16:17 -0800)
src/lib/ecore_cocoa/ecore_cocoa.m

index 8fa9e09..83a7e26 100644 (file)
@@ -84,6 +84,11 @@ ecore_cocoa_shutdown(void)
 
    DBG("Ecore Cocoa shutdown");
 
+   ecore_event_type_flush(ECORE_COCOA_EVENT_WINDOW_UNFOCUSED,
+                          ECORE_COCOA_EVENT_WINDOW_FOCUSED,
+                          ECORE_COCOA_EVENT_WINDOW_RESIZE_REQUEST,
+                          ECORE_COCOA_EVENT_WINDOW_DESTROY);
+
    eina_log_domain_unregister(_ecore_cocoa_log_domain);
    ecore_event_shutdown();