evas_shm: query wl_shm from ecore_wl2_display
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 11 Sep 2017 22:06:31 +0000 (17:06 -0500)
committerDerek Foreman <derekf@osg.samsung.com>
Thu, 12 Oct 2017 17:24:03 +0000 (12:24 -0500)
Stop using the internally stored copy, always query from active display.

This fixes session recovery.

src/modules/evas/engines/wayland_shm/evas_shm.c

index 515b4e6..6ad24c4 100644 (file)
@@ -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))