if (ewd->wl.compositor) wl_compositor_destroy(ewd->wl.compositor);
if (ewd->wl.subcompositor) wl_subcompositor_destroy(ewd->wl.subcompositor);
- wl_registry_destroy(wl_display_get_registry(ewd->wl.display));
+ if (ewd->wl.registry) wl_registry_destroy(ewd->wl.registry);
wl_display_flush(ewd->wl.display);
}
_cb_connect_data, ewd, NULL, NULL);
ewd->idle_enterer = ecore_idle_enterer_add(_cb_connect_idle, ewd);
-
- wl_registry_add_listener(wl_display_get_registry(ewd->wl.display),
- &_registry_listener, ewd);
+ ewd->wl.registry = wl_display_get_registry(ewd->wl.display);
+ wl_registry_add_listener(ewd->wl.registry, &_registry_listener, ewd);
ewd->xkb_context = xkb_context_new(0);
if (!ewd->xkb_context) goto context_err;
context_err:
ecore_main_fd_handler_del(ewd->fd_hdl);
- wl_registry_destroy(wl_display_get_registry(ewd->wl.display));
+ wl_registry_destroy(ewd->wl.registry);
wl_display_disconnect(ewd->wl.display);
connect_err:
{
EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
- return wl_display_get_registry(display->wl.display);
+ return display->wl.registry;
}
_ecore_wl2_input_cursor_setup(input);
input->wl.seat =
- wl_registry_bind(wl_display_get_registry(display->wl.display),
- id, &wl_seat_interface, 1);
+ wl_registry_bind(display->wl.registry, id, &wl_seat_interface, 1);
display->inputs =
eina_inlist_append(display->inputs, EINA_INLIST_GET(input));
output->display = display;
output->wl_output =
- wl_registry_bind(wl_display_get_registry(display->wl.display),
- id, &wl_output_interface, 2);
+ wl_registry_bind(display->wl.registry, id, &wl_output_interface, 2);
display->outputs =
eina_inlist_append(display->outputs, EINA_INLIST_GET(output));
struct
{
struct wl_display *display;
+ struct wl_registry *registry;
struct wl_compositor *compositor;
struct wl_subcompositor *subcompositor;
struct wl_data_device_manager *data_device_manager;