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); + } } /*