wl_backend: handle already-associated xwayland surfaces
If the xwayland surface already has a wlr_surface when we register listeners (associate event already fired), trigger the map handler directly. This fixes xterm and other X11 clients that associate their surface before the new_surface handler runs.
This commit is contained in:
parent
044a5b3486
commit
72a592a402
|
|
@ -1941,6 +1941,14 @@ handle_xwayland_new_surface(struct wl_listener *listener, void *data)
|
|||
view->x = (wl_state.output ? (int)wl_state.output->width : 1920) / 4;
|
||||
view->y = (wl_state.output ? (int)wl_state.output->height : 1080) / 4;
|
||||
|
||||
/* If the surface is already associated (has a wlr_surface), we missed
|
||||
* the associate event. Trigger the map handler directly. */
|
||||
if (xw->surface) {
|
||||
wwarning("wl_backend: xwayland surface 0x%x already associated, triggering map",
|
||||
(unsigned)xw->window_id);
|
||||
view->map_listener.notify(&view->map_listener, NULL);
|
||||
}
|
||||
|
||||
wwarning("wl_backend: new XWayland surface id=0x%lx class=%s title=%s pos=%d,%d",
|
||||
view->id,
|
||||
xw->class ? xw->class : "(none)",
|
||||
|
|
|
|||
Loading…
Reference in New Issue