After some reworking in elm_win, I think I have discovered an issue in ecore-cocoa handling: there is no event emitted from non-user resizing of a window. For example, if a window is resized from 10x10 -> 100x100, the app does not receive an efl event once the window is resized. There is some code around ecore_evas_cocoa.m:108 which implies that this is intentional, but I think this is a mistake; there must be an event notifying that the window has been resized so that the render size can synchronize with the window size.
The following patch should work, but it fails because there is no event received after the window is resized:
diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c index e1c5a66670..3ed1b995eb 100644 --- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c +++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c @@ -80,11 +80,13 @@ _ecore_evas_resize_common(Ecore_Evas *ee, if ((ee->w != w) || (ee->h != h)) { + if (resize_cocoa) + { + ecore_cocoa_window_resize((Ecore_Cocoa_Window *)ee->prop.window, w, h); + return; + } ee->w = w; ee->h = h; - if (resize_cocoa) - ecore_cocoa_window_resize((Ecore_Cocoa_Window *)ee->prop.window, w, h); - if (ECORE_EVAS_PORTRAIT(ee)) { evas_output_size_set(ee->evas, ee->w, ee->h); @@ -113,6 +115,7 @@ _ecore_evas_cocoa_event_window_resize(void *data EINA_UNUSED, int type EINA_UNUS return ECORE_CALLBACK_PASS_ON; } DBG("%p", ee); + ee->draw_block = 0; /* Do the resize */ _ecore_evas_resize_common(ee, e->w, e->h, EINA_FALSE); @@ -550,6 +553,7 @@ ecore_evas_cocoa_new_internal(Ecore_Cocoa_Window *parent EINA_UNUSED, int x, int ee->req.y = ee->y; ee->req.w = ee->w; ee->req.h = ee->h; + ee->draw_block = 1; ee->prop.max.w = 32767; ee->prop.max.h = 32767;