summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-09-11 17:06:31 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-10-12 12:24:03 -0500
commitf421521bed253525381e4cd7e4471e0af50daa96 (patch)
tree811710dd0e6e619277e5e07779b03f9b4aca5f2f
parent3f576e8436c5426f506efed61e2fa7ac51898cbf (diff)
evas_shm: query wl_shm from ecore_wl2_display
Stop using the internally stored copy, always query from active display. This fixes session recovery.
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c9
1 files 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 515b4e6..6ad24c4 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)
260 Shm_Surface *surface; 260 Shm_Surface *surface;
261 Shm_Pool *pool; 261 Shm_Pool *pool;
262 Shm_Data *data; 262 Shm_Data *data;
263 struct wl_shm *shm;
263 264
264 LOGFN(__FILE__, __LINE__, __FUNCTION__); 265 LOGFN(__FILE__, __LINE__, __FUNCTION__);
265 266
@@ -273,7 +274,8 @@ _shm_data_create(Shm_Pool *alt_pool, Shm_Data **ret, Surface *s, int w, int h)
273 goto out; 274 goto out;
274 } 275 }
275 276
276 if (!(pool = _shm_pool_create(surface->shm, ((w * sizeof(int)) * h)))) 277 shm = ecore_wl2_display_shm_get(s->ob->ewd);
278 if (!(pool = _shm_pool_create(shm, ((w * sizeof(int)) * h))))
277 { 279 {
278 ERR("Could not create shm pool"); 280 ERR("Could not create shm pool");
279 return; 281 return;
@@ -441,8 +443,11 @@ _evas_shm_surface_reconfigure(Surface *s, int w, int h, uint32_t flags, Eina_Boo
441 443
442 if ((resize) && (!surface->leaf[i].resize_pool)) 444 if ((resize) && (!surface->leaf[i].resize_pool))
443 { 445 {
446 struct wl_shm *shm;
447
448 shm = ecore_wl2_display_shm_get(s->ob->ewd);
444 surface->leaf[i].resize_pool = 449 surface->leaf[i].resize_pool =
445 _shm_pool_create(surface->shm, 6 * 1024 * 1024); 450 _shm_pool_create(shm, 6 * 1024 * 1024);
446 } 451 }
447 452
448 if (!_shm_leaf_create(s, &surface->leaf[i], w, h)) 453 if (!_shm_leaf_create(s, &surface->leaf[i], w, h))