};
static void
+_session_recovery_create_uuid(void *data EINA_UNUSED, struct zwp_e_session_recovery *session_recovery EINA_UNUSED, struct wl_surface *surface, const char *uuid)
+{
+ Ecore_Wl2_Window *win = wl_surface_get_user_data(surface);
+
+ eina_stringshare_replace(&win->uuid, uuid);
+}
+
+static const struct zwp_e_session_recovery_listener _session_listener =
+{
+ _session_recovery_create_uuid,
+};
+
+static void
_cb_global_event_free(void *data EINA_UNUSED, void *event)
{
Ecore_Wl2_Event_Global *ev;
ewd->wl.session_recovery =
wl_registry_bind(registry, id,
&zwp_e_session_recovery_interface, 1);
+ zwp_e_session_recovery_add_listener(ewd->wl.session_recovery,
+ &_session_listener, ewd);
}
else if (!strcmp(interface, "zwp_teamwork"))
{
window->surface_id = -1;
}
-static void
-_session_recovery_create_uuid(void *data, struct zwp_e_session_recovery *session_recovery EINA_UNUSED, struct wl_surface *surface EINA_UNUSED, const char *uuid)
-{
- Ecore_Wl2_Window *win = data;
-
- eina_stringshare_replace(&win->uuid, uuid);
-}
-
-static const struct zwp_e_session_recovery_listener _session_listener =
-{
- _session_recovery_create_uuid,
-};
static void
_ecore_wl2_window_configure_send(Ecore_Wl2_Window *window, int w, int h, unsigned int edges, Eina_Bool fs, Eina_Bool max)
ERR("Failed to create surface for window");
return;
}
+ wl_surface_set_user_data(window->surface, window);
window->surface_id =
wl_proxy_get_id((struct wl_proxy *)window->surface);
-
- if (window->display->wl.session_recovery)
- zwp_e_session_recovery_add_listener(window->display->wl.session_recovery,
- &_session_listener, window);
}
}