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.
This commit is contained in:
Window Maker 2026-05-25 09:13:42 +02:00
parent c243ac22ab
commit 044a5b3486
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}