From 36600ff1633871a996fe05b8e0ff0b22c2ebb0f9 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Feb 2019 12:52:15 +0100 Subject: =?UTF-8?q?wayland=5Fcommon:=20rename=20=E2=80=9Cshell=E2=80=9D=20?= =?UTF-8?q?into=20=E2=80=9Cwm=5Fbase=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 76211609e3c589dafe3ef9a36cacc06e8f56de09 started. --- video/out/wayland_common.c | 20 ++++++++++---------- video/out/wayland_common.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'video') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 45071c8f35..a929c2619e 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -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); diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index b381d7c46f..0648efa09a 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -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; -- cgit v1.2.3