From 3f35b0b0af997eaabc8c986e9e06ab6cd0ad67db Mon Sep 17 00:00:00 2001 From: Jonathan Rubenstein Date: Fri, 11 Jul 2025 20:29:11 +0300 Subject: [PATCH] [client] wayland: xdg handles resizable Added missing resizable functionality to xdg_shellInit when win:allowResize is set to true --- client/displayservers/Wayland/desktops/xdg/xdg.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/displayservers/Wayland/desktops/xdg/xdg.c b/client/displayservers/Wayland/desktops/xdg/xdg.c index a39451f6..558301cb 100644 --- a/client/displayservers/Wayland/desktops/xdg/xdg.c +++ b/client/displayservers/Wayland/desktops/xdg/xdg.c @@ -49,6 +49,7 @@ typedef struct XDGState uint32_t resizeSerial; bool fullscreen; bool floating; + bool resizable; int displayFd; } XDGState; @@ -155,6 +156,13 @@ bool xdg_shellInit(struct wl_display * display, struct wl_surface * surface, if (maximize) xdg_toplevel_set_maximized(state.toplevel); + if (!resizable) + { + xdg_toplevel_set_min_size(state.toplevel, state.width, state.height); + xdg_toplevel_set_max_size(state.toplevel, state.width, state.height); + } + state.resizable = resizable; + if (state.decorationManager) { state.toplevelDecoration = zxdg_decoration_manager_v1_get_toplevel_decoration( @@ -200,7 +208,7 @@ static void xdg_minimize(void) static void xdg_shellResize(int w, int h) { - if (!state.floating) + if (!state.floating || !state.resizable) return; state.width = w;