aboutsummaryrefslogtreecommitdiff
path: root/backend/wayland/registry.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/wayland/registry.c')
-rw-r--r--backend/wayland/registry.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/backend/wayland/registry.c b/backend/wayland/registry.c
index 9564b1dd..d6f61aa7 100644
--- a/backend/wayland/registry.c
+++ b/backend/wayland/registry.c
@@ -4,6 +4,18 @@
#include <wayland-client.h>
#include <wlr/util/log.h>
#include "backend/wayland.h"
+#include "xdg-shell-unstable-v6-client-protocol.h"
+
+
+static void xdg_shell_handle_ping(void *data, struct zxdg_shell_v6 *shell,
+ uint32_t serial) {
+ zxdg_shell_v6_pong(shell, serial);
+}
+
+static const struct zxdg_shell_v6_listener xdg_shell_listener = {
+ xdg_shell_handle_ping,
+};
+
static void registry_global(void *data, struct wl_registry *registry,
uint32_t name, const char *interface, uint32_t version) {
@@ -13,9 +25,10 @@ static void registry_global(void *data, struct wl_registry *registry,
if (strcmp(interface, wl_compositor_interface.name) == 0) {
backend->compositor = wl_registry_bind(registry, name,
&wl_compositor_interface, version);
- } else if (strcmp(interface, wl_shell_interface.name) == 0) {
+ } else if (strcmp(interface, zxdg_shell_v6_interface.name) == 0) {
backend->shell = wl_registry_bind(registry, name,
- &wl_shell_interface, version);
+ &zxdg_shell_v6_interface, version);
+ zxdg_shell_v6_add_listener(backend->shell, &xdg_shell_listener, NULL);
} else if (strcmp(interface, wl_shm_interface.name) == 0) {
backend->shm = wl_registry_bind(registry, name,
&wl_shm_interface, version);