ecore_wl: Hookup wl listener for uuid event from session recovery protocol

This should listen for events containing the assigned UUID from the compositor.
This commit is contained in:
Stefan Schmidt 2015-03-20 14:13:59 +01:00 committed by Stefan Schmidt
parent cb449adde6
commit 633747a05d
2 changed files with 17 additions and 0 deletions

View File

@ -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");

View File

@ -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