stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=633747a05de07e7273e7f164978850e5537979e3

commit 633747a05de07e7273e7f164978850e5537979e3
Author: Stefan Schmidt <s.schm...@samsung.com>
Date:   Fri Mar 20 14:13:59 2015 +0100

    ecore_wl: Hookup wl listener for uuid event from session recovery protocol
    
    This should listen for events containing the assigned UUID from the 
compositor.
---
 src/lib/ecore_wayland/ecore_wl.c         | 16 ++++++++++++++++
 src/lib/ecore_wayland/ecore_wl_private.h |  1 +
 2 files changed, 17 insertions(+)

diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c
index c9764f2..7b7b783 100644
--- a/src/lib/ecore_wayland/ecore_wl.c
+++ b/src/lib/ecore_wayland/ecore_wl.c
@@ -19,6 +19,8 @@
 #include "xdg-shell-client-protocol.h"
 #define XDG_VERSION 5
 
+#include "session-recovery-client-protocol.h"
+
 /* local function prototypes */
 static int _ecore_wl_shutdown(Eina_Bool close);
 static Eina_Bool _ecore_wl_cb_idle_enterer(void *data);
@@ -75,6 +77,17 @@ static const struct xdg_shell_listener xdg_shell_listener =
    xdg_shell_ping,
 };
 
+static void
+_ecore_wl_uuid_receive(void *data EINA_UNUSED, struct session_recovery 
*session_recovery EINA_UNUSED, const char *uuid)
+{
+   DBG("UUID assigned from compositor: %s", uuid);
+}
+
+static const struct session_recovery_listener 
_ecore_wl_session_recovery_listener =
+{
+   _ecore_wl_uuid_receive,
+};
+
 /* external variables */
 int _ecore_wl_log_dom = -1;
 Ecore_Wl_Display *_ecore_wl_disp = NULL;
@@ -190,6 +203,9 @@ ecore_wl_init(const char *name)
    wl_registry_add_listener(_ecore_wl_disp->wl.registry,
                             &_ecore_wl_registry_listener, _ecore_wl_disp);
 
+   session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery,
+                            &_ecore_wl_session_recovery_listener, 
_ecore_wl_disp);
+
    if (!_ecore_wl_xkb_init(_ecore_wl_disp))
      {
         ERR("Could not initialize XKB");
diff --git a/src/lib/ecore_wayland/ecore_wl_private.h 
b/src/lib/ecore_wayland/ecore_wl_private.h
index c54b157..21daf65 100644
--- a/src/lib/ecore_wayland/ecore_wl_private.h
+++ b/src/lib/ecore_wayland/ecore_wl_private.h
@@ -71,6 +71,7 @@ struct _Ecore_Wl_Display
         struct wl_shell *shell;
         struct xdg_shell *xdg_shell;
         struct wl_shell *desktop_shell;
+        struct session_recovery *session_recovery;
 # ifdef USE_IVI_SHELL
         struct ivi_application *ivi_application;
 # endif

-- 


Reply via email to