diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index c3ea4e3..25f5872 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -1046,12 +1046,18 @@ handle_xwayland_map(struct wl_listener *listener, void *data) xw->class ? xw->class : "(none)", xw->title ? xw->title : "(none)"); - /* Add to scene graph for compositing regardless of mode. */ + /* Add to scene graph for compositing regardless of mode. + * Use view->x,y (set in handle_new_xwayland_surface to output/4) + * rather than xw->x,y which may not yet reflect the configure we + * sent; the set_geometry listener keeps them in sync thereafter. */ if (wl_state.scene && !view->scene_node && xw->surface) { view->scene_node = wlr_scene_subsurface_tree_create( &wl_state.scene->node, xw->surface); if (view->scene_node) - wlr_scene_node_set_position(view->scene_node, xw->x, xw->y); + wlr_scene_node_set_position(view->scene_node, view->x, view->y); + } else if (!xw->surface) { + wwarning("wl_backend: xwayland map id=0x%lx: surface is NULL, window will not render", + view->id); } diff --git a/src/window.c b/src/window.c index e6f4775..68a2659 100644 --- a/src/window.c +++ b/src/window.c @@ -1251,8 +1251,8 @@ WWindow *wManageWindow(WScreen *scr, WNativeWindow window) if (wwin->frame) wWindowMap(wwin); - else if (!dpy) - wwin->flags.mapped = 1; /* Wayland: toplevel is visible by definition */ + else if (!dpy || wm_backend->is_wayland) + wwin->flags.mapped = 1; /* Wayland/XWayland: scene node visible by definition */ } /* setup stacking descriptor */