summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2019-02-15 12:52:15 +0100
committerJan Ekström <jeebjp@gmail.com>2019-02-17 23:44:34 +0200
commit36600ff1633871a996fe05b8e0ff0b22c2ebb0f9 (patch)
tree2084c85c17fb3aef76780b62d0b5412c805039cd
parent3dd59dbed06a55eed00ad68d0a953f39188e3647 (diff)
downloadmpv-36600ff1633871a996fe05b8e0ff0b22c2ebb0f9.tar.bz2
mpv-36600ff1633871a996fe05b8e0ff0b22c2ebb0f9.tar.xz
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 76211609e3c589dafe3ef9a36cacc06e8f56de09 started.
-rw-r--r--video/out/wayland_common.c20
-rw-r--r--video/out/wayland_common.h2
2 files changed, 11 insertions, 11 deletions
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;