diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index e43469b63b..19163cbabb 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -187,7 +187,6 @@ _ee_display_unset(Ecore_Evas *ee) einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas); if (!einfo) return; - einfo->info.wl2_display = NULL; einfo->info.wl2_win = NULL; wdata = ee->engine.data; @@ -2210,7 +2209,6 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas))) { - einfo->info.wl2_display = wdata->display; einfo->info.destination_alpha = EINA_TRUE; einfo->info.rotation = ee->rotation; einfo->info.wl2_win = wdata->win; @@ -2511,7 +2509,6 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i wdata->sync_done = EINA_TRUE; if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas))) { - einfo->info.wl2_display = ewd; einfo->info.destination_alpha = EINA_TRUE; einfo->info.rotation = ee->rotation; einfo->info.depth = 32; diff --git a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h index 4961132da8..e733825c82 100644 --- a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h +++ b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h @@ -14,7 +14,6 @@ struct _Evas_Engine_Info_Wayland /* engine specific data & parameters it needs to set up */ struct { - Ecore_Wl2_Display *wl2_display; Ecore_Wl2_Window *wl2_win; int depth, rotation, edges; Eina_Bool destination_alpha : 1; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index 560f54c136..4f22f8a787 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -658,8 +658,10 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int if (ob) { + Ecore_Wl2_Display *ewd; ob->info = inf; - if ((ob->info->info.wl2_display != ob->wl2_disp) || + ewd = ecore_wl2_window_display_get(ob->info->info.wl2_win); + if ((ewd != ob->wl2_disp) || (ob->info->info.wl2_win != ob->wl2_win) || /* FIXME: comment out below line. * since there is no place set the info->info.win for now, @@ -672,7 +674,7 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int Render_Output_Swap_Mode swap_mode = MODE_AUTO; gl_wins--; - if (!ob->info->info.wl2_display) + if (!ewd) { eng_window_free(ob); re->generic.software.ob = NULL; diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index aed592b5d1..7b916cc20e 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -29,7 +29,7 @@ eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Output_Swap gw->w = w; gw->h = h; gw->swap_mode = swap_mode; - gw->wl2_disp = einfo->info.wl2_display; + gw->wl2_disp = ecore_wl2_window_display_get(einfo->info.wl2_win); gw->wl2_win = einfo->info.wl2_win; if (display && (display != ecore_wl2_display_get(gw->wl2_disp))) context = EGL_NO_CONTEXT; diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index 53a5a79b65..46cea14689 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -178,7 +178,7 @@ _evas_surface_create(Evas_Engine_Info_Wayland *info, Outbuf *ob) out->info = info; out->ob = ob; - ewd = info->info.wl2_display; + ewd = ecore_wl2_window_display_get(info->info.wl2_win); if (ecore_wl2_display_shm_get(ewd)) types |= ECORE_WL2_BUFFER_SHM; if (ecore_wl2_display_dmabuf_get(ewd)) diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c index df6d68c431..d587abafe8 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.c +++ b/src/modules/evas/engines/wayland_shm/evas_engine.c @@ -130,14 +130,16 @@ eng_output_update(void *engine, void *data, void *info, unsigned int w, unsigned { Evas_Engine_Info_Wayland *einfo = info; Render_Engine *re = data; + Ecore_Wl2_Display *ewd; Outbuf *ob; ob = re->generic.ob; - if (ob->ewd != einfo->info.wl2_display) + ewd = ecore_wl2_window_display_get(einfo->info.wl2_win); + if (ob->ewd != ewd) { - if (einfo->info.wl2_display) + if (ewd) ob->dirty = EINA_TRUE; - re->generic.ob->ewd = einfo->info.wl2_display; + re->generic.ob->ewd = ewd; } eng_output_resize(engine, data, w, h); diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c index ddc24af7d4..ad80a4904d 100644 --- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c @@ -26,7 +26,7 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland *info) ob->rotation = info->info.rotation; ob->depth = info->info.depth; ob->priv.destination_alpha = info->info.destination_alpha; - ob->ewd = info->info.wl2_display; + ob->ewd = ecore_wl2_window_display_get(info->info.wl2_win); ob->surface = _evas_surface_create(info, ob); if (!ob->surface) goto surf_err;