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 <ofourdan@redhat.com>
This commit is contained in:
Olivier Fourdan 2023-07-18 12:21:55 +02:00
parent 7c85877485
commit 94deed272c

View File

@ -723,8 +723,8 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
struct xwl_screen *xwl_screen; struct xwl_screen *xwl_screen;
Pixel red_mask, blue_mask, green_mask; Pixel red_mask, blue_mask, green_mask;
int ret, bpc, green_bpc, i; int ret, bpc, green_bpc, i;
unsigned int xwl_width = 0; unsigned int xwl_width = 640;
unsigned int xwl_height = 0; unsigned int xwl_height = 480;
#ifdef XWL_HAS_GLAMOR #ifdef XWL_HAS_GLAMOR
Bool use_eglstreams = FALSE; Bool use_eglstreams = FALSE;
#endif #endif
@ -808,6 +808,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
else if (strcmp(argv[i], "-decorate") == 0) { else if (strcmp(argv[i], "-decorate") == 0) {
#ifdef XWL_HAS_LIBDECOR #ifdef XWL_HAS_LIBDECOR
xwl_screen->decorate = 1; xwl_screen->decorate = 1;
use_fixed_size = 1;
#else #else
ErrorF("This build does not have libdecor support\n"); ErrorF("This build does not have libdecor support\n");
#endif #endif