if (ewd->wl.www) www_destroy(ewd->wl.www);
if (ewd->wl.zxdg_shell) zxdg_shell_v6_destroy(ewd->wl.zxdg_shell);
if (ewd->wl.xdg_shell) xdg_shell_destroy(ewd->wl.xdg_shell);
- if (ewd->wl.wl_shell) wl_shell_destroy(ewd->wl.wl_shell);
if (ewd->wl.shm) wl_shm_destroy(ewd->wl.shm);
if (ewd->wl.data_device_manager)
wl_data_device_manager_destroy(ewd->wl.data_device_manager);
{
"zxdg_shell_v6",
"xdg_shell",
- "wl_shell",
NULL
};
if (!global) return;
- if (!strcmp(global->interface, "wl_shell"))
- {
- ewd->wl.wl_shell =
- wl_registry_bind(ewd->wl.registry, global->id,
- &wl_shell_interface, 1);
- ewd->shell_done = EINA_TRUE;
- }
- else if ((!strcmp(global->interface, "xdg_shell")) &&
+ if ((!strcmp(global->interface, "xdg_shell")) &&
(!getenv("EFL_WAYLAND_DONT_USE_XDG_SHELL")))
{
Ecore_Wl2_Window *window;
if (ewd->wl.www) www_destroy(ewd->wl.www);
if (ewd->wl.zxdg_shell) zxdg_shell_v6_destroy(ewd->wl.zxdg_shell);
if (ewd->wl.xdg_shell) xdg_shell_destroy(ewd->wl.xdg_shell);
- if (ewd->wl.wl_shell) wl_shell_destroy(ewd->wl.wl_shell);
if (ewd->wl.shm) wl_shm_destroy(ewd->wl.shm);
if (ewd->wl.data_device_manager)
wl_data_device_manager_destroy(ewd->wl.data_device_manager);
if (window->xdg_popup) xdg_popup_destroy(window->xdg_popup);
window->xdg_popup = NULL;
- if (window->wl_shell_surface)
- wl_shell_surface_destroy(window->wl_shell_surface);
- window->wl_shell_surface = NULL;
-
if (window->www_surface)
www_surface_destroy(window->www_surface);
window->www_surface = NULL;
}
static void
-_wl_shell_surface_cb_ping(void *data EINA_UNUSED, struct wl_shell_surface *shell_surface, unsigned int serial)
-{
- wl_shell_surface_pong(shell_surface, serial);
-}
-
-static void
-_wl_shell_surface_cb_configure(void *data, struct wl_shell_surface *shell_surface EINA_UNUSED, unsigned int edges, int w, int h)
-{
- Ecore_Wl2_Window *win = data;
-
- _ecore_wl2_window_configure_send(win, w, h, edges, win->fullscreen,
- win->maximized);
-}
-
-static void
-_wl_shell_surface_cb_popup_done(void *data EINA_UNUSED, struct wl_shell_surface *shell_surface EINA_UNUSED)
-{
- Ecore_Wl2_Window *win;
-
- win = data;
- if (!win) return;
-
- _ecore_wl2_input_ungrab(win->input);
-}
-
-static const struct wl_shell_surface_listener _wl_shell_surface_listener =
-{
- _wl_shell_surface_cb_ping,
- _wl_shell_surface_cb_configure,
- _wl_shell_surface_cb_popup_done
-};
-
-static void
_xdg_popup_cb_done(void *data, struct xdg_popup *xdg_popup EINA_UNUSED)
{
Ecore_Wl2_Window *win;
xdg_popup_add_listener(win->xdg_popup,
&_xdg_popup_listener, win);
}
- else if (win->wl_shell_surface)
- {
- wl_shell_surface_set_popup(win->wl_shell_surface,
- input->wl.seat,
- wl_display_get_serial(win->display->wl.display),
- win->parent->surface,
- win->geometry.x,
- win->geometry.y, 0);
- }
}
break;
case ECORE_WL2_WINDOW_TYPE_TOPLEVEL:
}
else if (win->xdg_surface)
xdg_surface_set_parent(win->xdg_surface, NULL);
- else if (win->wl_shell_surface)
- wl_shell_surface_set_toplevel(win->wl_shell_surface);
break;
default:
break;
window->pending.configure = EINA_FALSE;
_ecore_wl2_window_type_set(window);
}
- else if ((window->display->wl.wl_shell) && (!window->wl_shell_surface))
- {
- window->wl_shell_surface =
- wl_shell_get_shell_surface(window->display->wl.wl_shell,
- window->surface);
- if (!window->wl_shell_surface) goto surf_err;
-
- if (window->title)
- wl_shell_surface_set_title(window->wl_shell_surface, window->title);
- if (window->class)
- wl_shell_surface_set_class(window->wl_shell_surface, window->class);
-
- wl_shell_surface_add_listener(window->wl_shell_surface,
- &_wl_shell_surface_listener, window);
- window->pending.configure = EINA_FALSE;
- _ecore_wl2_window_type_set(window);
- }
if (window->display->wl.session_recovery)
{
else if (window->xdg_surface)
xdg_surface_move(window->xdg_surface, input->wl.seat,
window->display->serial);
- else if (window->wl_shell_surface)
- wl_shell_surface_move(window->wl_shell_surface, input->wl.seat,
- window->display->serial);
}
EAPI void
else if (window->xdg_surface)
xdg_surface_resize(window->xdg_surface, input->wl.seat,
window->display->serial, location);
- else if (window->wl_shell_surface)
- wl_shell_surface_resize(window->wl_shell_surface, input->wl.seat,
- window->display->serial, location);
}
EAPI void
&states, 0);
wl_array_release(&states);
}
- else if (window->wl_shell_surface)
- wl_shell_surface_set_toplevel(window->wl_shell_surface);
}
EAPI Eina_Bool
maximized = !!maximized;
if (prev == maximized) return;
- if (window->wl_shell_surface)
- window->maximized = maximized;
-
if (maximized)
{
window->saved = window->geometry;
zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
else if (window->xdg_surface)
xdg_surface_set_maximized(window->xdg_surface);
- else if (window->wl_shell_surface)
- wl_shell_surface_set_maximized(window->wl_shell_surface, NULL);
}
else
{
zxdg_toplevel_v6_unset_maximized(window->zxdg_toplevel);
else if (window->xdg_surface)
xdg_surface_unset_maximized(window->xdg_surface);
- else if (window->wl_shell_surface)
- {
- wl_shell_surface_set_toplevel(window->wl_shell_surface);
-
- _ecore_wl2_window_configure_send(window, window->saved.w,
- window->saved.h, 0,
- window->fullscreen,
- window->maximized);
- }
}
}
fullscreen = !!fullscreen;
if (prev == fullscreen) return;
- if (window->wl_shell_surface)
- window->fullscreen = fullscreen;
-
if (fullscreen)
{
window->saved = window->geometry;
zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
else if (window->xdg_surface)
xdg_surface_set_fullscreen(window->xdg_surface, NULL);
- else if (window->wl_shell_surface)
- wl_shell_surface_set_fullscreen(window->wl_shell_surface,
- WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
- 0, NULL);
}
else
{
zxdg_toplevel_v6_unset_fullscreen(window->zxdg_toplevel);
else if (window->xdg_surface)
xdg_surface_unset_fullscreen(window->xdg_surface);
- else if (window->wl_shell_surface)
- {
- wl_shell_surface_set_toplevel(window->wl_shell_surface);
-
- _ecore_wl2_window_configure_send(window, window->saved.w,
- window->saved.h, 0,
- window->fullscreen,
- window->maximized);
- }
}
}
zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
else if (window->xdg_surface)
xdg_surface_set_title(window->xdg_surface, window->title);
- else if (window->wl_shell_surface)
- wl_shell_surface_set_title(window->wl_shell_surface, window->title);
}
EAPI void
zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class);
else if (window->xdg_surface)
xdg_surface_set_app_id(window->xdg_surface, window->class);
- else if (window->wl_shell_surface)
- wl_shell_surface_set_class(window->wl_shell_surface, window->class);
}
EAPI void
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE);
- return (window->xdg_surface ||
- window->wl_shell_surface || window->zxdg_surface);
+ return (window->xdg_surface || window->zxdg_surface);
}