wayland_common: rename “shell” into “wm_base”

This is the naming xdg-shell stable adopted, it doesn’t make much sense
to keep using “shell” everywhere with all functions calling it
“wm_base”.

Finishes what 76211609e3 started.
This commit is contained in:
Emmanuel Gil Peyrot 2019-02-15 12:52:15 +01:00 committed by Jan Ekström
parent 3dd59dbed0
commit 36600ff163
2 changed files with 11 additions and 11 deletions

View File

@ -35,13 +35,13 @@
// Generated from xdg-decoration-unstable-v1.xml
#include "video/out/wayland/xdg-decoration-v1.h"
static void xdg_shell_ping(void *data, struct xdg_wm_base *shell, uint32_t serial)
static void xdg_wm_base_ping(void *data, struct xdg_wm_base *wm_base, uint32_t serial)
{
xdg_wm_base_pong(shell, serial);
xdg_wm_base_pong(wm_base, serial);
}
static const struct xdg_wm_base_listener xdg_shell_listener = {
xdg_shell_ping,
static const struct xdg_wm_base_listener xdg_wm_base_listener = {
xdg_wm_base_ping,
};
static int spawn_cursor(struct vo_wayland_state *wl)
@ -806,8 +806,8 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
if (!strcmp(interface, xdg_wm_base_interface.name) && found++) {
ver = MPMIN(ver, 2); /* We can use either 1 or 2 */
wl->shell = wl_registry_bind(reg, id, &xdg_wm_base_interface, ver);
xdg_wm_base_add_listener(wl->shell, &xdg_shell_listener, wl);
wl->wm_base = wl_registry_bind(reg, id, &xdg_wm_base_interface, ver);
xdg_wm_base_add_listener(wl->wm_base, &xdg_wm_base_listener, wl);
}
if (!strcmp(interface, wl_seat_interface.name) && found++) {
@ -956,7 +956,7 @@ static const struct xdg_toplevel_listener xdg_toplevel_listener = {
static int create_xdg_surface(struct vo_wayland_state *wl)
{
wl->xdg_surface = xdg_wm_base_get_xdg_surface(wl->shell, wl->surface);
wl->xdg_surface = xdg_wm_base_get_xdg_surface(wl->wm_base, wl->surface);
xdg_surface_add_listener(wl->xdg_surface, &xdg_surface_listener, wl);
wl->xdg_toplevel = xdg_surface_get_toplevel(wl->xdg_surface);
@ -1013,7 +1013,7 @@ int vo_wayland_init(struct vo *vo)
/* Do a roundtrip to run the registry */
wl_display_roundtrip(wl->display);
if (!wl->shell) {
if (!wl->wm_base) {
MP_FATAL(wl, "Compositor doesn't support the required %s protocol!\n",
xdg_wm_base_interface.name);
return false;
@ -1078,8 +1078,8 @@ void vo_wayland_uninit(struct vo *vo)
if (wl->idle_inhibit_manager)
zwp_idle_inhibit_manager_v1_destroy(wl->idle_inhibit_manager);
if (wl->shell)
xdg_wm_base_destroy(wl->shell);
if (wl->wm_base)
xdg_wm_base_destroy(wl->wm_base);
if (wl->shm)
wl_shm_destroy(wl->shm);

View File

@ -70,7 +70,7 @@ struct vo_wayland_state {
/* Shell */
struct wl_surface *surface;
struct xdg_wm_base *shell;
struct xdg_wm_base *wm_base;
struct xdg_toplevel *xdg_toplevel;
struct xdg_surface *xdg_surface;
struct zxdg_decoration_manager_v1 *xdg_decoration_manager;