-#if X11
-static Efl_Util_Callback_Info *
-_cb_info_find_by_xwin(unsigned int xwin,
- int idx)
-{
- Eina_List *l, *ll;
- Efl_Util_Callback_Info *info;
- unsigned int xwin2;
-
- l = _cb_info_list_get(idx);
- EINA_LIST_FOREACH(l, ll, info)
- {
- xwin2 = elm_win_xwindow_get(info->win);
- if (xwin == xwin2) return info;
- }
-
- return NULL;
-}
-
-static Eina_Bool
-_cb_x11_client_msg(void *data,
- int type,
- void *event)
-{
- Ecore_X_Event_Client_Message *ev;
- Ecore_X_Window xwin;
- Efl_Util_Callback_Info *info;
-
- ev = event;
- if (!ev) return ECORE_CALLBACK_PASS_ON;
-
- xwin = ev->win;
- if (xwin == 0) return ECORE_CALLBACK_PASS_ON;
-
- if (ev->message_type == _eflutil.cb_handler[CBH_NOTI_LEV].atom)
- {
- info = _cb_info_find_by_xwin(xwin, CBH_NOTI_LEV);
-
- /* permission denied */
- if ((ev->data.l[1] == 0) &&
- (info) &&
- (info->cb))
- {
- info->cb(info->win,
- EFL_UTIL_ERROR_PERMISSION_DENIED,
- info->data);
- }
- }
- else if (ev->message_type == _eflutil.cb_handler[CBH_SCR_MODE].atom)
- {
- info = _cb_info_find_by_xwin(xwin, CBH_SCR_MODE);
-
- /* permission denied */
- if ((ev->data.l[1] == 0) &&
- (info) &&
- (info->cb))
- {
- info->cb(info->win,
- EFL_UTIL_ERROR_PERMISSION_DENIED,
- info->data);
- }
- }
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool
-_x11_init(void)
-{
- if (_eflutil.x11.init) return EINA_TRUE;
-
- _eflutil.x11.dpy = ecore_x_display_get();
- EINA_SAFETY_ON_NULL_RETURN_VAL(_eflutil.x11.dpy, EINA_FALSE);
-
- _eflutil.x11.init = EINA_TRUE;
-
- return EINA_TRUE;
-}
-#endif /* end of X11 */
-
-#if WAYLAND