ecore_cocoa: fix live resize of windows
authorJean Guyomarc'h <jean.guyomarch@openwide.fr>
Fri, 16 Oct 2015 08:19:57 +0000 (10:19 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 1 Dec 2015 20:15:33 +0000 (12:15 -0800)
commit12db3c2213b901dd55b58c28e0c7bd04cb4af68c
tree6939f8f021e693bfdd41e94d7c90c9d4b3647657
parentca493337578e9c206ef3a31760b65a11d1884b0e
ecore_cocoa: fix live resize of windows

This was a tricky little bastard!
When a window is live resized, the NSWindow which is the target of
the live resize will wait for a kevent from the window manager,
until live resizing is done. So... live resizing is synchronous
and blocks the main thread... hence ecore_main_loop.

- When live resize starts, the Ecore_Timer which polls NSRunLoop
is paused.
- When the window is resized, the ecore_main_loop is run manually
with ecore_main_loop_iterate() to process Ecore events (mostly
Ecore_Evas)
- When live resize finished, the Ecore_Timer which polls NSRunLoop
is resumed.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/ecore_cocoa/ecore_cocoa_app.h
src/lib/ecore_cocoa/ecore_cocoa_app.m
src/lib/ecore_cocoa/ecore_cocoa_window.m