From b67d3a04fbc454aac39d4ffbf70ff9efd2559587 Mon Sep 17 00:00:00 2001 From: Window Maker Date: Mon, 25 May 2026 10:33:18 +0200 Subject: [PATCH] wl_backend: send 640x480 configure for xwayland surfaces with tiny initial size xterm starts with a 10x17 pixel window. The initial configure was sending that size back (since > 0), so xterm rendered at 10x17. Now use 640x480 default when the initial size is < 64px. --- src/backend/wayland/wl_backend.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index c67cfee..d2faf79 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -1951,11 +1951,14 @@ handle_xwayland_new_surface(struct wl_listener *listener, void *data) xw->title ? xw->title : "(none)", xw->x, xw->y); - /* Send initial configure so the X11 client gets a position. */ - wlr_xwayland_surface_configure(xw, - (int16_t)view->x, (int16_t)view->y, - xw->width > 0 ? xw->width : 640, - xw->height > 0 ? xw->height : 480); + /* Send initial configure so the X11 client gets a position and size. + * Use the client's requested size if reasonable, otherwise default. */ + { + int cw = (xw->width >= 64) ? xw->width : 640; + int ch = (xw->height >= 64) ? xw->height : 480; + wlr_xwayland_surface_configure(xw, + (int16_t)view->x, (int16_t)view->y, cw, ch); + } } /*