diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-07 12:38:57 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-07 12:38:57 +0200 |
commit | f3af22b10b1e64146d48be7726f6395c9a4185e9 (patch) | |
tree | 674786dcb7a6a3c8576e1f31ce7277e366bb6a5f /platform/linuxbsd/wayland/wayland_thread.cpp | |
parent | 438382cdc29df9f49744df1d67ef530415467570 (diff) | |
parent | 3e0632cbd217c258a201560d850fdce495fc7954 (diff) | |
download | redot-engine-f3af22b10b1e64146d48be7726f6395c9a4185e9.tar.gz |
Merge pull request #94021 from Riteo/scale-is-relative
Wayland: Scale relative pointer motion
Diffstat (limited to 'platform/linuxbsd/wayland/wayland_thread.cpp')
-rw-r--r-- | platform/linuxbsd/wayland/wayland_thread.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/linuxbsd/wayland/wayland_thread.cpp b/platform/linuxbsd/wayland/wayland_thread.cpp index 341cc517e3..7bdc75db29 100644 --- a/platform/linuxbsd/wayland/wayland_thread.cpp +++ b/platform/linuxbsd/wayland/wayland_thread.cpp @@ -2049,9 +2049,14 @@ void WaylandThread::_wp_relative_pointer_on_relative_motion(void *data, struct z PointerData &pd = ss->pointer_data_buffer; + WindowState *ws = wl_surface_get_window_state(ss->pointed_surface); + ERR_FAIL_NULL(ws); + pd.relative_motion.x = wl_fixed_to_double(dx); pd.relative_motion.y = wl_fixed_to_double(dy); + pd.relative_motion *= window_state_get_scale_factor(ws); + pd.relative_motion_time = uptime_lo; } |