From cda004c2a9d7ae585e9284c1989333297fbaeede Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Thu, 27 Jul 2023 08:49:19 +0200 Subject: [PATCH] xwayland: Use the screen width/height for libdecor state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The configure handler for libdecor, namely handle_libdecor_configure(), is where both the content and the decorations get resized (when needed). If for any reason, the actual size of the Xwayland screen fails to be updated, we would still appy the expected size rather than the actual one for the libdecor state. To avoid this, use the actual xwl_screen width/height for the libdecor state. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer --- hw/xwayland/xwayland-window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index 5707e3bfe..85d917161 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -641,7 +641,7 @@ handle_libdecor_configure(struct libdecor_frame *frame, } } - state = libdecor_state_new(width, height); + state = libdecor_state_new(xwl_screen->width, xwl_screen->height); libdecor_frame_commit(frame, state, configuration); libdecor_state_free(state);