summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-12-08 00:08:20 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2015-12-16 22:18:08 +0100
commit680eec5c5c58740e5e104df93b5dc2290ad31554 (patch)
tree587b87b53747f1c49325dafe8d038ce86c495873 /src/lib/ecore_wayland
parentd4d3f636533fd217ec00b7b66c9cc9c6c3891276 (diff)
ecore_wayland: add listener for uuid and provide already existing one
Setup a listener to receive an uid from the compositor. If we already have one during creation, aka we are re-connecting to recover a session, we provide it to the compositor so it can look our attributes up based on it. Again hidden behind and env var to avoid problems with other developments, for now. ref T2922
Diffstat (limited to 'src/lib/ecore_wayland')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index 1def7ab34f..44a3ef4d74 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -395,11 +395,22 @@ ecore_wl_window_surface_create(Ecore_Wl_Window *win)
395 395
396 EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL); 396 EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL);
397 397
398 char uuid[37];
399
398 if (win->surface) return win->surface; 400 if (win->surface) return win->surface;
399 if (_ecore_wl_disp->wl.session_recovery && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
400 session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, &_ecore_session_recovery_listener, win);
401 win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get()); 401 win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get());
402 if (!win->surface) return NULL; 402 if (!win->surface) return NULL;
403
404 if (_ecore_wl_disp->wl.session_recovery && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
405 {
406 session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery,
407 &_ecore_session_recovery_listener, win);
408 if (!uuid_is_null(win->uuid))
409 {
410 uuid_unparse(win->uuid, uuid);
411 session_recovery_provide_uuid(_ecore_wl_disp->wl.session_recovery, uuid);
412 }
413 }
403 win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface); 414 win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface);
404 return win->surface; 415 return win->surface;
405} 416}