diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index ee70a5f..f38e08c 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -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)",