forked from enlightenment/efl
ecore_evas_wayland: Use surface from engine info
Calling ecore_wl2_window_surface_get() has the side effect of creating a new wayland surface if we don't already have one. If we do that during a session recovery, we can try to create a new surface while we have no connection to a compositor - that's Bad. So we just use the one we already have stored - which we NULL out on disconnect.
This commit is contained in:
parent
f53f873b58
commit
706a1a33a4
|
@ -1476,10 +1476,13 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas, void *event EINA_
|
||||||
struct wl_surface *surf;
|
struct wl_surface *surf;
|
||||||
int fx, fy;
|
int fx, fy;
|
||||||
|
|
||||||
wdata = ee->engine.data;
|
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(evas);
|
||||||
surf = ecore_wl2_window_surface_get(wdata->win);
|
if (!einfo) return;
|
||||||
|
|
||||||
|
surf = einfo->info.wl_surface;
|
||||||
if (!surf) return;
|
if (!surf) return;
|
||||||
|
|
||||||
|
wdata = ee->engine.data;
|
||||||
if (wdata->win->pending.configure) return;
|
if (wdata->win->pending.configure) return;
|
||||||
|
|
||||||
wdata->anim_callback = wl_surface_frame(surf);
|
wdata->anim_callback = wl_surface_frame(surf);
|
||||||
|
@ -1499,10 +1502,6 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas, void *event EINA_
|
||||||
/* Surviving bits of WWW - track interesting state we might want
|
/* Surviving bits of WWW - track interesting state we might want
|
||||||
* to pass to clients to do client side effects
|
* to pass to clients to do client side effects
|
||||||
*/
|
*/
|
||||||
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(evas);
|
|
||||||
if (!einfo) return;
|
|
||||||
|
|
||||||
wdata = ee->engine.data;
|
|
||||||
einfo->window.x = wdata->win->geometry.x;
|
einfo->window.x = wdata->win->geometry.x;
|
||||||
einfo->window.y = wdata->win->geometry.y;
|
einfo->window.y = wdata->win->geometry.y;
|
||||||
einfo->window.w = wdata->win->geometry.w;
|
einfo->window.w = wdata->win->geometry.w;
|
||||||
|
|
Loading…
Reference in New Issue