stefan pushed a commit to branch master.

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

commit 680eec5c5c58740e5e104df93b5dc2290ad31554
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Tue Dec 8 00:08:20 2015 +0100

    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
---
 src/lib/ecore_wayland/ecore_wl_window.c | 15 +++++++++++++--
 1 file 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 1def7ab..44a3ef4 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)
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL);
 
+   char uuid[37];
+
    if (win->surface) return win->surface;
-   if (_ecore_wl_disp->wl.session_recovery && 
getenv("EFL_WAYLAND_SESSION_RECOVERY"))
-     session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, 
&_ecore_session_recovery_listener, win);
    win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get());
    if (!win->surface) return NULL;
+
+   if (_ecore_wl_disp->wl.session_recovery && 
getenv("EFL_WAYLAND_SESSION_RECOVERY"))
+     {
+        session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery,
+                                      &_ecore_session_recovery_listener, win);
+        if (!uuid_is_null(win->uuid))
+          {
+             uuid_unparse(win->uuid, uuid);
+             
session_recovery_provide_uuid(_ecore_wl_disp->wl.session_recovery, uuid);
+          }
+     }
    win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface);
    return win->surface;
 }

-- 


Reply via email to