From f19fe9d260cfc3e4e2991393bf9339caba8b7a5a Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 26 Jul 2023 09:36:17 +0200 Subject: [PATCH] xwayland: Use update size from libdecor configure handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to avoid repeating the same code in two places. This is essentially a cosmetic change, not a functional change. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer --- hw/xwayland/xwayland-window.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index 985b0f14a..1766c48af 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -643,7 +643,6 @@ handle_libdecor_configure(struct libdecor_frame *frame, { struct xwl_window *xwl_window = data; struct xwl_screen *xwl_screen = xwl_window->xwl_screen; - struct libdecor_state *state; int width, height; if (!libdecor_configuration_get_content_size(configuration, frame, &width, &height)) { @@ -654,9 +653,8 @@ handle_libdecor_configure(struct libdecor_frame *frame, if (xwl_screen->width != width || xwl_screen->height != height) xwl_window_libdecor_resize(xwl_window, width, height); - state = libdecor_state_new(xwl_screen->width, xwl_screen->height); - libdecor_frame_commit(frame, state, configuration); - libdecor_state_free(state); + xwl_window_update_libdecor_size(xwl_window, configuration, + xwl_screen->width, xwl_screen->height); } static void