diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 91de40c2d9a2fc7d99a578e4fde3f9e993fb8576..551efb9f02f0ca37e1481a71e6c673117c4eb93d 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -644,6 +644,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) xwl_screen->ResizeWindow = pScreen->ResizeWindow; pScreen->ResizeWindow = xwl_resize_window; + xwl_screen->MoveWindow = pScreen->MoveWindow; + pScreen->MoveWindow = xwl_move_window; + if (xwl_screen->rootless) { xwl_screen->SetWindowPixmap = pScreen->SetWindowPixmap; pScreen->SetWindowPixmap = xwl_window_set_window_pixmap; diff --git a/hw/xwayland/xwayland-screen.h b/hw/xwayland/xwayland-screen.h index fb87ddb305680e24b677d0b13daf5c139d95226b..abfbc9f1bc910fa45ed07787771861f0e91f0c91 100644 --- a/hw/xwayland/xwayland-screen.h +++ b/hw/xwayland/xwayland-screen.h @@ -65,6 +65,7 @@ struct xwl_screen { SetWindowPixmapProcPtr SetWindowPixmap; ChangeWindowAttributesProcPtr ChangeWindowAttributes; ResizeWindowProcPtr ResizeWindow; + MoveWindowProcPtr MoveWindow; struct xorg_list output_list; struct xorg_list seat_list; diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index 4dc6f2486180d116c19dc0464b971c5108179bf2..085d26cbe85977b45adf5ce73b5728c745a135ff 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -693,6 +693,28 @@ xwl_resize_window(WindowPtr window, xwl_window_check_resolution_change_emulation(xwl_window); } +void +xwl_move_window(WindowPtr window, + int x, int y, + WindowPtr next_sib, + VTKind kind) +{ + ScreenPtr screen = window->drawable.pScreen; + struct xwl_screen *xwl_screen; + struct xwl_window *xwl_window; + + xwl_screen = xwl_screen_get(screen); + xwl_window = xwl_window_from_window(window); + + screen->MoveWindow = xwl_screen->MoveWindow; + (*screen->MoveWindow) (window, x, y, next_sib, kind); + xwl_screen->MoveWindow = screen->MoveWindow; + screen->MoveWindow = xwl_move_window; + + if (xwl_window && (xwl_window_get(window) || xwl_window_is_toplevel(window))) + xwl_window_check_resolution_change_emulation(xwl_window); +} + static void frame_callback(void *data, struct wl_callback *callback, diff --git a/hw/xwayland/xwayland-window.h b/hw/xwayland/xwayland-window.h index 550edb28c5adcd5affc3a4efc13e81fb8b8c7d7e..86292e9304cd028c1de31f049eb26df2fb2a50aa 100644 --- a/hw/xwayland/xwayland-window.h +++ b/hw/xwayland/xwayland-window.h @@ -33,6 +33,7 @@ #include #include #include +#include #include "xwayland-types.h" @@ -73,6 +74,10 @@ void xwl_resize_window(WindowPtr window, int x, int y, unsigned int width, unsigned int height, WindowPtr sib); +void xwl_move_window(WindowPtr window, + int x, int y, + WindowPtr next_sib, + VTKind kind); Bool xwl_destroy_window(WindowPtr window); void xwl_window_post_damage(struct xwl_window *xwl_window); void xwl_window_create_frame_callback(struct xwl_window *xwl_window);