From 044a5b34866b99af7b20382c1c05d9fa86d7c20b Mon Sep 17 00:00:00 2001 From: Window Maker Date: Mon, 25 May 2026 09:13:42 +0200 Subject: [PATCH] wl_backend: use minimum 640x480 for xwayland surfaces with tiny initial size xterm and other X11 clients create a small initial window then resize. At map time, xw_surface->width/height may still be the initial tiny value (e.g. 10x17). wManageWindow reads this and creates a tiny frame. Use 640x480 as fallback when width/height <= 1. --- src/backend/wayland/wl_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 89f9b3e..ee70a5f 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -7258,8 +7258,8 @@ wl_window_get_client_attrs(WNativeWindow win, WClientAttributes *out) if (v && v->xw_surface) { if (v->xw_surface->surface && v->xw_surface->surface->mapped) { out->map_state = WCLIENT_VIEWABLE; - out->width = v->xw_surface->width; - out->height = v->xw_surface->height; + out->width = v->xw_surface->width > 1 ? v->xw_surface->width : 640; + out->height = v->xw_surface->height > 1 ? v->xw_surface->height : 480; } else { out->map_state = WCLIENT_UNMAPPED; }