Skip to content

Commit

Permalink
Merge pull request godotengine#94021 from Riteo/scale-is-relative
Browse files Browse the repository at this point in the history
Wayland: Scale relative pointer motion
  • Loading branch information
akien-mga committed Jul 7, 2024
2 parents 438382c + 3e0632c commit f3af22b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/linuxbsd/wayland/wayland_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f3af22b

Please sign in to comment.