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.
This commit is contained in:
parent
d4d5240426
commit
b67d3a04fb
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue