Skip to content

Commit f3af22b

Browse files
committed
Merge pull request godotengine#94021 from Riteo/scale-is-relative
Wayland: Scale relative pointer motion
2 parents 438382c + 3e0632c commit f3af22b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

platform/linuxbsd/wayland/wayland_thread.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,9 +2049,14 @@ void WaylandThread::_wp_relative_pointer_on_relative_motion(void *data, struct z
20492049

20502050
PointerData &pd = ss->pointer_data_buffer;
20512051

2052+
WindowState *ws = wl_surface_get_window_state(ss->pointed_surface);
2053+
ERR_FAIL_NULL(ws);
2054+
20522055
pd.relative_motion.x = wl_fixed_to_double(dx);
20532056
pd.relative_motion.y = wl_fixed_to_double(dy);
20542057

2058+
pd.relative_motion *= window_state_get_scale_factor(ws);
2059+
20552060
pd.relative_motion_time = uptime_lo;
20562061
}
20572062

0 commit comments

Comments
 (0)