diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2015-03-20 14:13:59 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2015-06-29 17:10:06 +0200 |
commit | 633747a05de07e7273e7f164978850e5537979e3 (patch) | |
tree | 3506865e92e37fadcb752bd3c87c99518df5c99a | |
parent | cb449adde6d992c42bb01ebae10cd76b544da8db (diff) | |
download | efl-633747a05de07e7273e7f164978850e5537979e3.tar.gz |
ecore_wl: Hookup wl listener for uuid event from session recovery protocol
This should listen for events containing the assigned UUID from the compositor.
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl.c | 16 | ||||
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_private.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c index c9764f26a6..7b7b783f87 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 c54b157c1f..21daf65492 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 |