+static Eina_Bool
+_wl_init_default_queue(void)
+{
+ struct wl_display *display_wrapper = NULL;
+ struct wl_registry *reg = NULL;
+
+ if (_eflutil_defaultqueue.wl.init) return EINA_TRUE;
+
+ if (ecore_wl2_init() <= 0) return EINA_FALSE;
+
+ _eflutil_defaultqueue.wl.wl2_display = ecore_wl2_connected_display_get(NULL);
+ EINA_SAFETY_ON_NULL_GOTO(_eflutil_defaultqueue.wl.wl2_display, fail);
+ _eflutil_defaultqueue.wl.dpy = ecore_wl2_display_get(_eflutil_defaultqueue.wl.wl2_display);
+ EINA_SAFETY_ON_NULL_GOTO(_eflutil_defaultqueue.wl.dpy, fail);
+
+ display_wrapper = wl_proxy_create_wrapper(_eflutil_defaultqueue.wl.dpy);
+ EINA_SAFETY_ON_NULL_GOTO(display_wrapper, fail);
+
+ reg = wl_display_get_registry(display_wrapper);
+ wl_proxy_wrapper_destroy(display_wrapper);
+ display_wrapper = NULL;
+ EINA_SAFETY_ON_NULL_GOTO(reg, fail);
+
+ wl_registry_add_listener(reg, &_wl_default_queue_reg_listener, NULL);
+
+ _eflutil_defaultqueue.wl.init = EINA_TRUE;
+
+ return EINA_TRUE;
+fail:
+ if (display_wrapper)
+ wl_proxy_wrapper_destroy(display_wrapper);
+
+ ecore_wl2_shutdown();
+ return EINA_FALSE;
+}
+