From 6744a6278ee1a827a17c3fe853a40713800b3bd8 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 26 Jul 2022 12:49:57 +0300 Subject: [PATCH] clients/window: Bump xdg-shell version to latest It seems we've missed an update from 3 to 4 (bounds events). With it, this updates to version 5 which sends the capabilities event. Stubs, as we're not using them. Signed-off-by: Marius Vlad --- clients/window.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/clients/window.c b/clients/window.c index 8073fbc6..81131f90 100644 --- a/clients/window.c +++ b/clients/window.c @@ -4206,9 +4206,24 @@ xdg_toplevel_handle_close(void *data, struct xdg_toplevel *xdg_surface) window_close(window); } +static void +xdg_toplevel_handle_configure_bounds(void *data, struct xdg_toplevel *xdg_toplevel, + int32_t width, int32_t height) +{ +} + + +static void +xdg_toplevel_handle_wm_capabilities(void *data, struct xdg_toplevel *xdg_toplevel, + struct wl_array *caps) +{ +} + static const struct xdg_toplevel_listener xdg_toplevel_listener = { xdg_toplevel_handle_configure, xdg_toplevel_handle_close, + xdg_toplevel_handle_configure_bounds, + xdg_toplevel_handle_wm_capabilities, }; static void @@ -5849,7 +5864,8 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t id, display_add_data_device(d, id, version); } else if (strcmp(interface, "xdg_wm_base") == 0) { d->xdg_shell = wl_registry_bind(registry, id, - &xdg_wm_base_interface, 1); + &xdg_wm_base_interface, + MIN(version, 5)); xdg_wm_base_add_listener(d->xdg_shell, &wm_base_listener, d); } else if (strcmp(interface, "text_cursor_position") == 0) { d->text_cursor_position =