derekf pushed a commit to branch master.

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

commit f421521bed253525381e4cd7e4471e0af50daa96
Author: Derek Foreman <[email protected]>
Date:   Mon Sep 11 17:06:31 2017 -0500

    evas_shm: query wl_shm from ecore_wl2_display
    
    Stop using the internally stored copy, always query from active display.
    
    This fixes session recovery.
---
 src/modules/evas/engines/wayland_shm/evas_shm.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c 
b/src/modules/evas/engines/wayland_shm/evas_shm.c
index 515b4e68df..6ad24c48fc 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -260,6 +260,7 @@ _shm_data_create(Shm_Pool *alt_pool, Shm_Data **ret, 
Surface *s, int w, int h)
    Shm_Surface *surface;
    Shm_Pool *pool;
    Shm_Data *data;
+   struct wl_shm *shm;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -273,7 +274,8 @@ _shm_data_create(Shm_Pool *alt_pool, Shm_Data **ret, 
Surface *s, int w, int h)
           goto out;
      }
 
-   if (!(pool = _shm_pool_create(surface->shm, ((w * sizeof(int)) * h))))
+   shm = ecore_wl2_display_shm_get(s->ob->ewd);
+   if (!(pool = _shm_pool_create(shm, ((w * sizeof(int)) * h))))
      {
         ERR("Could not create shm pool");
         return;
@@ -441,8 +443,11 @@ _evas_shm_surface_reconfigure(Surface *s, int w, int h, 
uint32_t flags, Eina_Boo
 
         if ((resize) && (!surface->leaf[i].resize_pool))
           {
+             struct wl_shm *shm;
+
+             shm = ecore_wl2_display_shm_get(s->ob->ewd);
              surface->leaf[i].resize_pool = 
-               _shm_pool_create(surface->shm, 6 * 1024 * 1024);
+               _shm_pool_create(shm, 6 * 1024 * 1024);
           }
 
         if (!_shm_leaf_create(s, &surface->leaf[i], w, h))

-- 


Reply via email to