Commit f99fac22 authored by Anthony Enrione's avatar Anthony Enrione Committed by Daniel Stone

clients: use xdg_shell stable instead of v6

Now that Weston supports the stable revision, use it. Better to excercise the
current rather than outdated protocol.

Pekka:
- split the patch, rewrote commit message
- rename xdg_shell_ping to xdg_wm_base_ping
- rename xdg_shell_listener to wm_base_listener
- rename shell to wm_base
- fix continued line alignment
- drop unrelated change of adding parentheses around bit-wise and
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent d8d9f5e6
......@@ -607,8 +607,8 @@ demo_clients += \
weston_simple_shm_SOURCES = clients/simple-shm.c
nodist_weston_simple_shm_SOURCES = \
protocol/xdg-shell-unstable-v6-protocol.c \
protocol/xdg-shell-unstable-v6-client-protocol.h \
protocol/xdg-shell-protocol.c \
protocol/xdg-shell-client-protocol.h \
protocol/fullscreen-shell-unstable-v1-protocol.c \
protocol/fullscreen-shell-unstable-v1-client-protocol.h
weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
......@@ -618,8 +618,8 @@ weston_simple_damage_SOURCES = clients/simple-damage.c
nodist_weston_simple_damage_SOURCES = \
protocol/viewporter-protocol.c \
protocol/viewporter-client-protocol.h \
protocol/xdg-shell-unstable-v6-protocol.c \
protocol/xdg-shell-unstable-v6-client-protocol.h \
protocol/xdg-shell-protocol.c \
protocol/xdg-shell-client-protocol.h \
protocol/fullscreen-shell-unstable-v1-protocol.c \
protocol/fullscreen-shell-unstable-v1-client-protocol.h
weston_simple_damage_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
......@@ -649,8 +649,8 @@ if BUILD_SIMPLE_EGL_CLIENTS
demo_clients += weston-simple-egl
weston_simple_egl_SOURCES = clients/simple-egl.c
nodist_weston_simple_egl_SOURCES = \
protocol/xdg-shell-unstable-v6-protocol.c \
protocol/xdg-shell-unstable-v6-client-protocol.h
protocol/xdg-shell-protocol.c \
protocol/xdg-shell-client-protocol.h
weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
endif
......@@ -661,8 +661,8 @@ weston_simple_dmabuf_drm_SOURCES = \
clients/simple-dmabuf-drm.c \
clients/simple-dmabuf-drm-data.h
nodist_weston_simple_dmabuf_drm_SOURCES = \
protocol/xdg-shell-unstable-v6-protocol.c \
protocol/xdg-shell-unstable-v6-client-protocol.h \
protocol/xdg-shell-protocol.c \
protocol/xdg-shell-client-protocol.h \
protocol/fullscreen-shell-unstable-v1-protocol.c \
protocol/fullscreen-shell-unstable-v1-client-protocol.h \
protocol/linux-dmabuf-unstable-v1-protocol.c \
......@@ -679,8 +679,8 @@ if BUILD_SIMPLE_DMABUF_V4L_CLIENT
demo_clients += weston-simple-dmabuf-v4l
weston_simple_dmabuf_v4l_SOURCES = clients/simple-dmabuf-v4l.c
nodist_weston_simple_dmabuf_v4l_SOURCES = \
protocol/xdg-shell-unstable-v6-protocol.c \
protocol/xdg-shell-unstable-v6-client-protocol.h \
protocol/xdg-shell-protocol.c \
protocol/xdg-shell-client-protocol.h \
protocol/fullscreen-shell-unstable-v1-protocol.c \
protocol/fullscreen-shell-unstable-v1-client-protocol.h \
protocol/linux-dmabuf-unstable-v1-protocol.c \
......@@ -717,8 +717,8 @@ nodist_libtoytoolkit_la_SOURCES = \
protocol/text-cursor-position-client-protocol.h \
protocol/viewporter-protocol.c \
protocol/viewporter-client-protocol.h \
protocol/xdg-shell-unstable-v6-protocol.c \
protocol/xdg-shell-unstable-v6-client-protocol.h \
protocol/xdg-shell-protocol.c \
protocol/xdg-shell-client-protocol.h \
protocol/pointer-constraints-unstable-v1-protocol.c \
protocol/pointer-constraints-unstable-v1-client-protocol.h \
protocol/relative-pointer-unstable-v1-protocol.c \
......@@ -966,6 +966,8 @@ BUILT_SOURCES += \
protocol/fullscreen-shell-unstable-v1-client-protocol.h \
protocol/xdg-shell-unstable-v6-protocol.c \
protocol/xdg-shell-unstable-v6-client-protocol.h \
protocol/xdg-shell-protocol.c \
protocol/xdg-shell-client-protocol.h \
protocol/ivi-hmi-controller-protocol.c \
protocol/ivi-hmi-controller-client-protocol.h \
protocol/ivi-application-protocol.c \
......
......@@ -4,8 +4,8 @@ endif
srcs_toytoolkit = [
'window.c',
xdg_shell_unstable_v6_client_protocol_h,
xdg_shell_unstable_v6_protocol_c,
xdg_shell_client_protocol_h,
xdg_shell_protocol_c,
text_cursor_position_client_protocol_h,
text_cursor_position_protocol_c,
relative_pointer_unstable_v1_client_protocol_h,
......@@ -41,8 +41,8 @@ simple_clients = [
'simple-damage.c',
viewporter_client_protocol_h,
viewporter_protocol_c,
xdg_shell_unstable_v6_client_protocol_h,
xdg_shell_unstable_v6_protocol_c,
xdg_shell_client_protocol_h,
xdg_shell_protocol_c,
fullscreen_shell_unstable_v1_client_protocol_h,
fullscreen_shell_unstable_v1_protocol_c,
],
......@@ -74,8 +74,8 @@ simple_clients = [
'simple-dmabuf-v4l.c',
linux_dmabuf_unstable_v1_client_protocol_h,
linux_dmabuf_unstable_v1_protocol_c,
xdg_shell_unstable_v6_client_protocol_h,
xdg_shell_unstable_v6_protocol_c,
xdg_shell_client_protocol_h,
xdg_shell_protocol_c,
fullscreen_shell_unstable_v1_client_protocol_h,
fullscreen_shell_unstable_v1_protocol_c,
],
......@@ -85,8 +85,8 @@ simple_clients = [
'name': 'egl',
'sources': [
'simple-egl.c',
xdg_shell_unstable_v6_client_protocol_h,
xdg_shell_unstable_v6_protocol_c,
xdg_shell_client_protocol_h,
xdg_shell_protocol_c,
ivi_application_client_protocol_h,
ivi_application_protocol_c,
],
......@@ -98,8 +98,8 @@ simple_clients = [
'name': 'shm',
'sources': [
'simple-shm.c',
xdg_shell_unstable_v6_client_protocol_h,
xdg_shell_unstable_v6_protocol_c,
xdg_shell_client_protocol_h,
xdg_shell_protocol_c,
fullscreen_shell_unstable_v1_client_protocol_h,
fullscreen_shell_unstable_v1_protocol_c,
ivi_application_client_protocol_h,
......@@ -322,8 +322,8 @@ if simple_dmabuf_drm_deps.length() > 0
executable(
'weston-simple-dmabuf-drm',
'simple-dmabuf-drm.c',
xdg_shell_unstable_v6_client_protocol_h,
xdg_shell_unstable_v6_protocol_c,
xdg_shell_client_protocol_h,
xdg_shell_protocol_c,
fullscreen_shell_unstable_v1_client_protocol_h,
fullscreen_shell_unstable_v1_protocol_c,
linux_dmabuf_unstable_v1_client_protocol_h,
......
......@@ -39,7 +39,7 @@
#include <wayland-client.h>
#include "shared/os-compatibility.h"
#include "shared/zalloc.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
#include "xdg-shell-client-protocol.h"
#include "fullscreen-shell-unstable-v1-client-protocol.h"
#include "viewporter-client-protocol.h"
......@@ -51,7 +51,7 @@ struct display {
int compositor_version;
struct wl_compositor *compositor;
struct wp_viewporter *viewporter;
struct zxdg_shell_v6 *shell;
struct xdg_wm_base *wm_base;
struct zwp_fullscreen_shell_v1 *fshell;
struct wl_shm *shm;
uint32_t formats;
......@@ -74,8 +74,8 @@ struct window {
int width, height, border;
struct wl_surface *surface;
struct wp_viewport *viewport;
struct zxdg_surface_v6 *xdg_surface;
struct zxdg_toplevel_v6 *xdg_toplevel;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct wl_callback *callback;
struct buffer buffers[2];
struct buffer *prev_buffer;
......@@ -149,12 +149,12 @@ create_shm_buffer(struct display *display, struct buffer *buffer,
}
static void
xdg_surface_handle_configure(void *data, struct zxdg_surface_v6 *surface,
xdg_surface_handle_configure(void *data, struct xdg_surface *surface,
uint32_t serial)
{
struct window *window = data;
zxdg_surface_v6_ack_configure(surface, serial);
xdg_surface_ack_configure(surface, serial);
if (window->wait_for_configure) {
redraw(window, NULL, 0);
......@@ -162,24 +162,24 @@ xdg_surface_handle_configure(void *data, struct zxdg_surface_v6 *surface,
}
}
static const struct zxdg_surface_v6_listener xdg_surface_listener = {
static const struct xdg_surface_listener xdg_surface_listener = {
xdg_surface_handle_configure,
};
static void
xdg_toplevel_handle_configure(void *data, struct zxdg_toplevel_v6 *toplevel,
xdg_toplevel_handle_configure(void *data, struct xdg_toplevel *toplevel,
int32_t width, int32_t height,
struct wl_array *states)
{
}
static void
xdg_toplevel_handle_close(void *data, struct zxdg_toplevel_v6 *xdg_toplevel)
xdg_toplevel_handle_close(void *data, struct xdg_toplevel *xdg_toplevel)
{
running = 0;
}
static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
xdg_toplevel_handle_configure,
xdg_toplevel_handle_close,
};
......@@ -317,25 +317,25 @@ create_window(struct display *display, int width, int height,
window->viewport = wp_viewporter_get_viewport(display->viewporter,
window->surface);
if (display->shell) {
if (display->wm_base) {
window->xdg_surface =
zxdg_shell_v6_get_xdg_surface(display->shell,
window->surface);
xdg_wm_base_get_xdg_surface(display->wm_base,
window->surface);
assert(window->xdg_surface);
zxdg_surface_v6_add_listener(window->xdg_surface,
&xdg_surface_listener, window);
xdg_surface_add_listener(window->xdg_surface,
&xdg_surface_listener, window);
window->xdg_toplevel =
zxdg_surface_v6_get_toplevel(window->xdg_surface);
xdg_surface_get_toplevel(window->xdg_surface);
assert(window->xdg_toplevel);
zxdg_toplevel_v6_add_listener(window->xdg_toplevel,
&xdg_toplevel_listener, window);
xdg_toplevel_add_listener(window->xdg_toplevel,
&xdg_toplevel_listener, window);
zxdg_toplevel_v6_set_title(window->xdg_toplevel, "simple-damage");
xdg_toplevel_set_title(window->xdg_toplevel, "simple-damage");
window->wait_for_configure = true;
wl_surface_commit(window->surface);
......@@ -370,9 +370,9 @@ destroy_window(struct window *window)
wl_buffer_destroy(window->buffers[1].buffer);
if (window->xdg_toplevel)
zxdg_toplevel_v6_destroy(window->xdg_toplevel);
xdg_toplevel_destroy(window->xdg_toplevel);
if (window->xdg_surface)
zxdg_surface_v6_destroy(window->xdg_surface);
xdg_surface_destroy(window->xdg_surface);
if (window->viewport)
wp_viewport_destroy(window->viewport);
wl_surface_destroy(window->surface);
......@@ -711,13 +711,13 @@ struct wl_shm_listener shm_listener = {
};
static void
xdg_shell_ping(void *data, struct zxdg_shell_v6*shell, uint32_t serial)
xdg_wm_base_ping(void *data, struct xdg_wm_base *shell, uint32_t serial)
{
zxdg_shell_v6_pong(shell, serial);
xdg_wm_base_pong(shell, serial);
}
static const struct zxdg_shell_v6_listener xdg_shell_listener = {
xdg_shell_ping,
static const struct xdg_wm_base_listener wm_base_listener = {
xdg_wm_base_ping,
};
static void
......@@ -743,10 +743,10 @@ registry_handle_global(void *data, struct wl_registry *registry,
} else if (strcmp(interface, "wp_viewporter") == 0) {
d->viewporter = wl_registry_bind(registry, id,
&wp_viewporter_interface, 1);
} else if (strcmp(interface, "zxdg_shell_v6") == 0) {
d->shell = wl_registry_bind(registry,
id, &zxdg_shell_v6_interface, 1);
zxdg_shell_v6_add_listener(d->shell, &xdg_shell_listener, d);
} else if (strcmp(interface, "xdg_wm_base") == 0) {
d->wm_base = wl_registry_bind(registry,
id, &xdg_wm_base_interface, 1);
xdg_wm_base_add_listener(d->wm_base, &wm_base_listener, d);
} else if (strcmp(interface, "zwp_fullscreen_shell_v1") == 0) {
d->fshell = wl_registry_bind(registry,
id, &zwp_fullscreen_shell_v1_interface, 1);
......@@ -808,8 +808,8 @@ destroy_display(struct display *display)
if (display->shm)
wl_shm_destroy(display->shm);
if (display->shell)
zxdg_shell_v6_destroy(display->shell);
if (display->wm_base)
xdg_wm_base_destroy(display->wm_base);
if (display->fshell)
zwp_fullscreen_shell_v1_release(display->fshell);
......
......@@ -57,7 +57,7 @@
#include <wayland-client.h>
#include "shared/zalloc.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
#include "xdg-shell-client-protocol.h"
#include "fullscreen-shell-unstable-v1-client-protocol.h"
#include "linux-dmabuf-unstable-v1-client-protocol.h"
......@@ -77,7 +77,7 @@ struct display {
struct wl_display *display;
struct wl_registry *registry;
struct wl_compositor *compositor;
struct zxdg_shell_v6 *shell;
struct xdg_wm_base *wm_base;
struct zwp_fullscreen_shell_v1 *fshell;
struct zwp_linux_dmabuf_v1 *dmabuf;
int xrgb8888_format_found;
......@@ -135,8 +135,8 @@ struct window {
struct display *display;
int width, height;
struct wl_surface *surface;
struct zxdg_surface_v6 *xdg_surface;
struct zxdg_toplevel_v6 *xdg_toplevel;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct buffer buffers[NUM_BUFFERS];
struct buffer *prev_buffer;
struct wl_callback *callback;
......@@ -592,36 +592,36 @@ error:
}
static void
xdg_surface_handle_configure(void *data, struct zxdg_surface_v6 *surface,
xdg_surface_handle_configure(void *data, struct xdg_surface *surface,
uint32_t serial)
{
struct window *window = data;
zxdg_surface_v6_ack_configure(surface, serial);
xdg_surface_ack_configure(surface, serial);
if (window->initialized && window->wait_for_configure)
redraw(window, NULL, 0);
window->wait_for_configure = false;
}
static const struct zxdg_surface_v6_listener xdg_surface_listener = {
static const struct xdg_surface_listener xdg_surface_listener = {
xdg_surface_handle_configure,
};
static void
xdg_toplevel_handle_configure(void *data, struct zxdg_toplevel_v6 *toplevel,
xdg_toplevel_handle_configure(void *data, struct xdg_toplevel *toplevel,
int32_t width, int32_t height,
struct wl_array *states)
{
}
static void
xdg_toplevel_handle_close(void *data, struct zxdg_toplevel_v6 *xdg_toplevel)
xdg_toplevel_handle_close(void *data, struct xdg_toplevel *xdg_toplevel)
{
running = 0;
}
static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
xdg_toplevel_handle_configure,
xdg_toplevel_handle_close,
};
......@@ -644,25 +644,25 @@ create_window(struct display *display, int width, int height, int format,
window->height = height;
window->surface = wl_compositor_create_surface(display->compositor);
if (display->shell) {
if (display->wm_base) {
window->xdg_surface =
zxdg_shell_v6_get_xdg_surface(display->shell,
window->surface);
xdg_wm_base_get_xdg_surface(display->wm_base,
window->surface);
assert(window->xdg_surface);
zxdg_surface_v6_add_listener(window->xdg_surface,
&xdg_surface_listener, window);
xdg_surface_add_listener(window->xdg_surface,
&xdg_surface_listener, window);
window->xdg_toplevel =
zxdg_surface_v6_get_toplevel(window->xdg_surface);
xdg_surface_get_toplevel(window->xdg_surface);
assert(window->xdg_toplevel);
zxdg_toplevel_v6_add_listener(window->xdg_toplevel,
&xdg_toplevel_listener, window);
xdg_toplevel_add_listener(window->xdg_toplevel,
&xdg_toplevel_listener, window);
zxdg_toplevel_v6_set_title(window->xdg_toplevel, "simple-dmabuf");
xdg_toplevel_set_title(window->xdg_toplevel, "simple-dmabuf");
window->wait_for_configure = true;
wl_surface_commit(window->surface);
......@@ -707,9 +707,9 @@ destroy_window(struct window *window)
}
if (window->xdg_toplevel)
zxdg_toplevel_v6_destroy(window->xdg_toplevel);
xdg_toplevel_destroy(window->xdg_toplevel);
if (window->xdg_surface)
zxdg_surface_v6_destroy(window->xdg_surface);
xdg_surface_destroy(window->xdg_surface);
wl_surface_destroy(window->surface);
free(window);
}
......@@ -796,13 +796,13 @@ static const struct zwp_linux_dmabuf_v1_listener dmabuf_listener = {
};
static void
xdg_shell_ping(void *data, struct zxdg_shell_v6 *shell, uint32_t serial)
xdg_wm_base_ping(void *data, struct xdg_wm_base *shell, uint32_t serial)
{
zxdg_shell_v6_pong(shell, serial);
xdg_wm_base_pong(shell, serial);
}
static const struct zxdg_shell_v6_listener xdg_shell_listener = {
xdg_shell_ping,
static const struct xdg_wm_base_listener wm_base_listener = {
xdg_wm_base_ping,
};
static void
......@@ -815,10 +815,10 @@ registry_handle_global(void *data, struct wl_registry *registry,
d->compositor =
wl_registry_bind(registry,
id, &wl_compositor_interface, 1);
} else if (strcmp(interface, "zxdg_shell_v6") == 0) {
d->shell = wl_registry_bind(registry,
id, &zxdg_shell_v6_interface, 1);
zxdg_shell_v6_add_listener(d->shell, &xdg_shell_listener, d);
} else if (strcmp(interface, "xdg_wm_base") == 0) {
d->wm_base = wl_registry_bind(registry,
id, &xdg_wm_base_interface, 1);
xdg_wm_base_add_listener(d->wm_base, &wm_base_listener, d);
} else if (strcmp(interface, "zwp_fullscreen_shell_v1") == 0) {
d->fshell = wl_registry_bind(registry,
id, &zwp_fullscreen_shell_v1_interface, 1);
......@@ -882,8 +882,8 @@ destroy_display(struct display *display)
if (display->dmabuf)
zwp_linux_dmabuf_v1_destroy(display->dmabuf);
if (display->shell)
zxdg_shell_v6_destroy(display->shell);
if (display->wm_base)
xdg_wm_base_destroy(display->wm_base);
if (display->fshell)
zwp_fullscreen_shell_v1_release(display->fshell);
......
......@@ -47,7 +47,7 @@
#include <wayland-client.h>
#include "shared/zalloc.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
#include "xdg-shell-client-protocol.h"
#include "fullscreen-shell-unstable-v1-client-protocol.h"
#include "linux-dmabuf-unstable-v1-client-protocol.h"
......@@ -100,7 +100,7 @@ struct display {
struct wl_compositor *compositor;
struct wl_seat *seat;
struct wl_keyboard *keyboard;
struct zxdg_shell_v6 *shell;
struct xdg_wm_base *wm_base;
struct zwp_fullscreen_shell_v1 *fshell;
struct zwp_linux_dmabuf_v1 *dmabuf;
bool requested_format_found;
......@@ -125,8 +125,8 @@ struct buffer {
struct window {
struct display *display;
struct wl_surface *surface;
struct zxdg_surface_v6 *xdg_surface;
struct zxdg_toplevel_v6 *xdg_toplevel;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct buffer buffers[NUM_BUFFERS];
struct wl_callback *callback;
bool wait_for_configure;
......@@ -536,36 +536,36 @@ start_capture(struct display *display)
}
static void
xdg_surface_handle_configure(void *data, struct zxdg_surface_v6 *surface,
xdg_surface_handle_configure(void *data, struct xdg_surface *surface,
uint32_t serial)
{
struct window *window = data;
zxdg_surface_v6_ack_configure(surface, serial);
xdg_surface_ack_configure(surface, serial);
if (window->initialized && window->wait_for_configure)
redraw(window, NULL, 0);
window->wait_for_configure = false;
}
static const struct zxdg_surface_v6_listener xdg_surface_listener = {
static const struct xdg_surface_listener xdg_surface_listener = {
xdg_surface_handle_configure,
};
static void
xdg_toplevel_handle_configure(void *data, struct zxdg_toplevel_v6 *toplevel,
xdg_toplevel_handle_configure(void *data, struct xdg_toplevel *toplevel,
int32_t width, int32_t height,
struct wl_array *states)
{
}
static void
xdg_toplevel_handle_close(void *data, struct zxdg_toplevel_v6 *xdg_toplevel)
xdg_toplevel_handle_close(void *data, struct xdg_toplevel *xdg_toplevel)
{
running = 0;
}
static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
xdg_toplevel_handle_configure,
xdg_toplevel_handle_close,
};
......@@ -583,25 +583,25 @@ create_window(struct display *display)
window->display = display;
window->surface = wl_compositor_create_surface(display->compositor);
if (display->shell) {
if (display->wm_base) {
window->xdg_surface =
zxdg_shell_v6_get_xdg_surface(display->shell,
window->surface);
xdg_wm_base_get_xdg_surface(display->wm_base,
window->surface);
assert(window->xdg_surface);
zxdg_surface_v6_add_listener(window->xdg_surface,
&xdg_surface_listener, window);
xdg_surface_add_listener(window->xdg_surface,
&xdg_surface_listener, window);
window->xdg_toplevel =
zxdg_surface_v6_get_toplevel(window->xdg_surface);
xdg_surface_get_toplevel(window->xdg_surface);
assert(window->xdg_toplevel);
zxdg_toplevel_v6_add_listener(window->xdg_toplevel,
&xdg_toplevel_listener, window);
xdg_toplevel_add_listener(window->xdg_toplevel,
&xdg_toplevel_listener, window);
zxdg_toplevel_v6_set_title(window->xdg_toplevel, "simple-dmabuf-v4l");
xdg_toplevel_set_title(window->xdg_toplevel, "simple-dmabuf-v4l");
window->wait_for_configure = true;
wl_surface_commit(window->surface);
......@@ -627,9 +627,9 @@ destroy_window(struct window *window)
wl_callback_destroy(window->callback);
if (window->xdg_toplevel)
zxdg_toplevel_v6_destroy(window->xdg_toplevel);
xdg_toplevel_destroy(window->xdg_toplevel);
if (window->xdg_surface)
zxdg_surface_v6_destroy(window->xdg_surface);
xdg_surface_destroy(window->xdg_surface);
wl_surface_destroy(window->surface);
for (i = 0; i < NUM_BUFFERS; i++) {
......@@ -737,7 +737,7 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard,
{
struct display *d = data;
if (!d->shell)
if (!d->wm_base)
return;
if (key == KEY_ESC && state)
......@@ -780,13 +780,13 @@ static const struct wl_seat_listener seat_listener = {
};
static void
xdg_shell_ping(void *data, struct zxdg_shell_v6 *shell, uint32_t serial)
xdg_wm_base_ping(void *data, struct xdg_wm_base *shell, uint32_t serial)
{
zxdg_shell_v6_pong(shell, serial);
xdg_wm_base_pong(shell, serial);
}
static const struct zxdg_shell_v6_listener xdg_shell_listener = {
xdg_shell_ping,
static const struct xdg_wm_base_listener wm_base_listener = {
xdg_wm_base_ping,
};
static void
......@@ -803,10 +803,10 @@ registry_handle_global(void *data, struct wl_registry *registry,
d->seat = wl_registry_bind(registry,
id, &wl_seat_interface, 1);
wl_seat_add_listener(d->seat, &seat_listener, d);
} else if (strcmp(interface, "zxdg_shell_v6") == 0) {
d->shell = wl_registry_bind(registry,
id, &zxdg_shell_v6_interface, 1);
zxdg_shell_v6_add_listener(d->shell, &xdg_shell_listener, d);
} else if (strcmp(interface, "xdg_wm_base") == 0) {
d->wm_base = wl_registry_bind(registry,
id, &xdg_wm_base_interface, 1);
xdg_wm_base_add_listener(d->wm_base, &wm_base_listener, d);
} else if (strcmp(interface, "zwp_fullscreen_shell_v1") == 0) {
d->fshell = wl_registry_bind(registry,
id, &zwp_fullscreen_shell_v1_interface,
......@@ -874,8 +874,8 @@ destroy_display(struct display *display)
if (display->dmabuf)
zwp_linux_dmabuf_v1_destroy(display->dmabuf);
if (display->shell)
zxdg_shell_v6_destroy(display->shell);
if (display->wm_base)
xdg_wm_base_destroy(display->wm_base);
if (display->fshell)
zwp_fullscreen_shell_v1_release(display->fshell);
......
......@@ -42,7 +42,7 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "xdg-shell-unstable-v6-client-protocol.h"
#include "xdg-shell-client-protocol.h"
#include <sys/types.h>
#include <unistd.h>
......@@ -57,7 +57,7 @@ struct display {
struct wl_display *display;
struct wl_registry *registry;
struct wl_compositor *compositor;
struct zxdg_shell_v6 *shell;
struct xdg_wm_base *wm_base;
struct wl_seat *seat;
struct wl_pointer *pointer;
struct wl_touch *touch;
......@@ -92,8 +92,8 @@ struct window {
uint32_t benchmark_time, frames;
struct wl_egl_window *native;
struct wl_surface *surface;
struct zxdg_surface_v6 *xdg_surface;
struct zxdg_toplevel_v6 *xdg_toplevel;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
EGLSurface egl_surface;
struct wl_callback *callback;