forked from enlightenment/efl
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:
parent
cb449adde6
commit
633747a05d
|
@ -19,6 +19,8 @@
|
||||||
#include "xdg-shell-client-protocol.h"
|
#include "xdg-shell-client-protocol.h"
|
||||||
#define XDG_VERSION 5
|
#define XDG_VERSION 5
|
||||||
|
|
||||||
|
#include "session-recovery-client-protocol.h"
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static int _ecore_wl_shutdown(Eina_Bool close);
|
static int _ecore_wl_shutdown(Eina_Bool close);
|
||||||
static Eina_Bool _ecore_wl_cb_idle_enterer(void *data);
|
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,
|
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 */
|
/* external variables */
|
||||||
int _ecore_wl_log_dom = -1;
|
int _ecore_wl_log_dom = -1;
|
||||||
Ecore_Wl_Display *_ecore_wl_disp = NULL;
|
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,
|
wl_registry_add_listener(_ecore_wl_disp->wl.registry,
|
||||||
&_ecore_wl_registry_listener, _ecore_wl_disp);
|
&_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))
|
if (!_ecore_wl_xkb_init(_ecore_wl_disp))
|
||||||
{
|
{
|
||||||
ERR("Could not initialize XKB");
|
ERR("Could not initialize XKB");
|
||||||
|
|
|
@ -71,6 +71,7 @@ struct _Ecore_Wl_Display
|
||||||
struct wl_shell *shell;
|
struct wl_shell *shell;
|
||||||
struct xdg_shell *xdg_shell;
|
struct xdg_shell *xdg_shell;
|
||||||
struct wl_shell *desktop_shell;
|
struct wl_shell *desktop_shell;
|
||||||
|
struct session_recovery *session_recovery;
|
||||||
# ifdef USE_IVI_SHELL
|
# ifdef USE_IVI_SHELL
|
||||||
struct ivi_application *ivi_application;
|
struct ivi_application *ivi_application;
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Reference in New Issue