From 94deed272cbd5cf891d24e24fff6a455757b5fb2 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 18 Jul 2023 12:21:55 +0200 Subject: [PATCH] xwayland: Use sensible defaults for rootful size If "-decorate" is used but no "-geometry" is specified, Xwayland rootful would take its size from the actual Wayland outputs combined. That is not practical, especially when using multiple outputs, as the resulting Xwayland window would be much larger than a single monitor. To avoid that, set a sensible default size for the Xwayland decorate window, using 640x480 to match what Xephyr does. Signed-off-by: Olivier Fourdan --- hw/xwayland/xwayland-screen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 0ac44e17b..37ee7da0f 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -723,8 +723,8 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) struct xwl_screen *xwl_screen; Pixel red_mask, blue_mask, green_mask; int ret, bpc, green_bpc, i; - unsigned int xwl_width = 0; - unsigned int xwl_height = 0; + unsigned int xwl_width = 640; + unsigned int xwl_height = 480; #ifdef XWL_HAS_GLAMOR Bool use_eglstreams = FALSE; #endif @@ -808,6 +808,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) else if (strcmp(argv[i], "-decorate") == 0) { #ifdef XWL_HAS_LIBDECOR xwl_screen->decorate = 1; + use_fixed_size = 1; #else ErrorF("This build does not have libdecor support\n"); #endif