derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=706a1a33a45061264660acb20da4a16e999f6499

commit 706a1a33a45061264660acb20da4a16e999f6499
Author: Derek Foreman <[email protected]>
Date:   Fri Mar 3 13:13:14 2017 -0600

    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.
---
 .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c    | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

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 4a5a71e..d29bb7c 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
@@ -1476,10 +1476,13 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas 
*evas, void *event EINA_
    struct wl_surface *surf;
    int fx, fy;
 
-   wdata = ee->engine.data;
-   surf = ecore_wl2_window_surface_get(wdata->win);
+   einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(evas);
+   if (!einfo) return;
+
+   surf = einfo->info.wl_surface;
    if (!surf) return;
 
+   wdata = ee->engine.data;
    if (wdata->win->pending.configure) return;
 
    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
     * 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.y = wdata->win->geometry.y;
    einfo->window.w = wdata->win->geometry.w;

-- 


Reply via email to