Send a synthetic configure notify event to the reparented window to update the position in Xwayland. This fixes menu positioning in clients like VLC after moving the window. --- xwayland/window-manager.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index c307e19..542e9fb 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -659,13 +659,12 @@ weston_wm_window_get_input_rect(struct weston_wm_window *window, } static void -weston_wm_window_send_configure_notify(struct weston_wm_window *window) +weston_wm_window_send_configure_notify(struct weston_wm_window *window, + int x, int y) { xcb_configure_notify_event_t configure_notify; struct weston_wm *wm = window->wm; - int x, y; - weston_wm_window_get_child_position(window, &x, &y); configure_notify.response_type = XCB_CONFIGURE_NOTIFY; configure_notify.pad0 = 0; configure_notify.event = window->id; @@ -702,7 +701,7 @@ weston_wm_handle_configure_request(struct weston_wm *wm, xcb_generic_event_t *ev return; if (window->fullscreen) { - weston_wm_window_send_configure_notify(window); + weston_wm_window_send_configure_notify(window, 0, 0); return; } @@ -2734,6 +2733,7 @@ send_position(struct weston_surface *surface, int32_t x, int32_t y) struct weston_wm_window *window = get_wm_window(surface); struct weston_wm *wm; uint32_t mask, values[2]; + int sx, sy; if (!window || !window->wm) return; @@ -2750,6 +2750,10 @@ send_position(struct weston_surface *surface, int32_t x, int32_t y) mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; xcb_configure_window(wm->conn, window->frame_id, mask, values); + + weston_wm_window_get_child_position(window, &sx, &sy); + weston_wm_window_send_configure_notify(window, x + sx, y + sy); + xcb_flush(wm->conn); } } -- 2.7.4 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel