ecore-evas-wayland: Add handler for window_configure_complete event

Small patch to add a handler so we can listen for when the surface
configure event is complete and can then go ahead and attach buffers
to the surface. This allows rage <filename> to work again in Weston :)

NB: This does allow rage <filename> to work under Weston now, but
still fails under Enlightenment for some reason :(

ref T5090

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-01-11 12:23:53 -05:00
parent 755c50a84e
commit 6d51e0b1f3
1 changed files with 32 additions and 2 deletions

View File

@ -113,7 +113,7 @@ struct _EE_Wl_Device
/* local variables */ /* local variables */
static int _ecore_evas_wl_init_count = 0; static int _ecore_evas_wl_init_count = 0;
static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[12]; static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[13];
static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location); static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
@ -304,6 +304,31 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
static Eina_Bool
_ecore_evas_wl_common_cb_window_configure_complete(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Evas *ee;
Ecore_Wl2_Event_Window_Configure_Complete *ev;
Evas_Engine_Info_Wayland *einfo;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ev = event;
ee = ecore_event_window_match(ev->win);
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
if (!einfo) return ECORE_CALLBACK_PASS_ON;
einfo->info.hidden = EINA_FALSE;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
ERR("Failed to set Evas Engine Info for '%s'", ee->driver);
return ECORE_CALLBACK_PASS_ON;
}
static void static void
_mouse_move_dispatch(Ecore_Evas *ee) _mouse_move_dispatch(Ecore_Evas *ee)
{ {
@ -823,6 +848,10 @@ _ecore_evas_wl_common_init(void)
ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED, ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED,
_ecore_evas_wl_common_cb_seat_capabilities_changed, _ecore_evas_wl_common_cb_seat_capabilities_changed,
NULL); NULL);
_ecore_evas_wl_event_hdls[12] =
ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
_ecore_evas_wl_common_cb_window_configure_complete,
NULL);
ecore_event_evas_init(); ecore_event_evas_init();
@ -1740,7 +1769,7 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee)
if (einfo) if (einfo)
{ {
einfo->info.wl_surface = ecore_wl2_window_surface_get(wdata->win); einfo->info.wl_surface = ecore_wl2_window_surface_get(wdata->win);
einfo->info.hidden = EINA_FALSE; einfo->info.hidden = wdata->win->pending.configure; //EINA_FALSE;
einfo->www_avail = !!wdata->win->www_surface; einfo->www_avail = !!wdata->win->www_surface;
einfo->just_mapped = EINA_TRUE; einfo->just_mapped = EINA_TRUE;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
@ -2204,6 +2233,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
einfo->info.wl_shm = ecore_wl2_display_shm_get(ewd); einfo->info.wl_shm = ecore_wl2_display_shm_get(ewd);
einfo->info.compositor_version = einfo->info.compositor_version =
ecore_wl2_display_compositor_version_get(ewd); ecore_wl2_display_compositor_version_get(ewd);
einfo->info.hidden = EINA_TRUE;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
{ {