diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index cf0ca87b0..502581425 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -664,8 +664,8 @@ dispatch_absolute_motion(struct xwl_seat *xwl_seat) event_y *= xwl_screen->global_surface_scale; if (xwl_window_has_viewport_enabled(xwl_seat->focus_window)) { - event_x *= xwl_seat->focus_window->scale_x; - event_y *= xwl_seat->focus_window->scale_y; + event_x *= xwl_seat->focus_window->viewport_scale_x; + event_y *= xwl_seat->focus_window->viewport_scale_y; } x = drawable_x + event_x; diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index e83ca8a2c..00cdbdd58 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -290,8 +290,8 @@ xwl_window_enable_viewport(struct xwl_window *xwl_window, xwl_output->width, xwl_output->height); - xwl_window->scale_x = (float) width / xwl_output->width; - xwl_window->scale_y = (float) height / xwl_output->height; + xwl_window->viewport_scale_x = (float) width / xwl_output->width; + xwl_window->viewport_scale_y = (float) height / xwl_output->height; } static Bool diff --git a/hw/xwayland/xwayland-window.h b/hw/xwayland/xwayland-window.h index 7c70bb9ed..2873ab707 100644 --- a/hw/xwayland/xwayland-window.h +++ b/hw/xwayland/xwayland-window.h @@ -53,7 +53,7 @@ struct xwl_window { struct xwl_screen *xwl_screen; struct wl_surface *surface; struct wp_viewport *viewport; - float scale_x, scale_y; + float viewport_scale_x, viewport_scale_y; struct xdg_surface *xdg_surface; struct xdg_toplevel *xdg_toplevel; WindowPtr window;