ecore_wayland: store uuid received from compositor
authorStefan Schmidt <stefan@osg.samsung.com>
Mon, 7 Dec 2015 23:06:38 +0000 (00:06 +0100)
committerStefan Schmidt <stefan@osg.samsung.com>
Wed, 16 Dec 2015 21:18:08 +0000 (22:18 +0100)
If we get an uuid assigned from the compositor we will store them locally to
provide it later on if needed.

ref T2922

src/lib/ecore_wayland/ecore_wl_private.h
src/lib/ecore_wayland/ecore_wl_window.c

index 91b2d54..589f9f9 100644 (file)
@@ -3,6 +3,7 @@
 
 # include <limits.h>
 # include <unistd.h>
+# include <uuid/uuid.h>
 
 # include "Ecore.h"
 # include "Ecore_Input.h"
@@ -173,6 +174,8 @@ struct _Ecore_Wl_Window
    Ecore_Wl_Subsurf *subsurfs;
 
    void *data;
+
+   uuid_t uuid;
 };
 
 struct _Ecore_Wl_Input
index b74ab62..1def7ab 100644 (file)
@@ -1093,10 +1093,17 @@ _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup)
 static void
 _ecore_session_recovery_uuid(void *data EINA_UNUSED, struct session_recovery *session_recovery, const char *uuid)
 {
+   Ecore_Wl_Window *win;
+   char uuid_string[37];
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+   if (!(win = data)) return;
    if (!session_recovery) return;
-   DBG("UUID event received from compositor with UUID: %s", uuid);
+   uuid_parse(uuid, win->uuid);
+
+   uuid_unparse(win->uuid, uuid_string);
+   DBG("UUID event received from compositor with UUID: %s\n", uuid_string);
 }
 
 static void