Verified Commit 3e5303da authored by Ilia Bozhinov's avatar Ilia Bozhinov Committed by Quentin Glidic

xwm: update override-redirect surface's position upon configure_notify

When we receive configure_notify we should update the surface's
position by calling xwayland_api->set_xwayland(). Otherwise some surfaces
like dnd surfaces from xwayland views are "stuck" at one place. When
setting XWAYLAND state though we should always call view_set_position(),
not just the first time we set this state.
Signed-off-by: Ilia Bozhinov's avatarIlia Bozhinov <>
Reviewed-by: Quentin Glidic's avatarQuentin Glidic <>
parent 749637a8
......@@ -112,7 +112,6 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
weston_view_set_position(surface->view, x, y);
surface->view->is_mapped = true;
wsurface->is_mapped = true;
......@@ -316,6 +315,7 @@ set_xwayland(struct weston_desktop_xwayland_surface *surface, int x, int y)
weston_desktop_xwayland_surface_change_state(surface, XWAYLAND, NULL,
x, y);
weston_view_set_position(surface->view, x, y);
static int
......@@ -739,6 +739,8 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve
xcb_configure_notify_event_t *configure_notify =
(xcb_configure_notify_event_t *) event;
const struct weston_desktop_xwayland_interface *xwayland_api =
struct weston_wm_window *window;
wm_log("XCB_CONFIGURE_NOTIFY (window %d) %d,%d @ %dx%d%s\n",
......@@ -760,6 +762,13 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve
if (window->frame)
window->width, window->height);
/* We should check if shsurf has been created because sometimes
* there are races
* (configure_notify is sent before xserver_map_surface) */
if (window->shsurf)
window->x, window->y);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment