Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounding error in Viewport.warp_mouse #91567

Open
Sauermann opened this issue May 4, 2024 · 0 comments
Open

Rounding error in Viewport.warp_mouse #91567

Sauermann opened this issue May 4, 2024 · 0 comments

Comments

@Sauermann
Copy link
Contributor

Tested versions

  • Reproducible in v4.3.dev.custom_build [7ebc866]
  • Reproducible in v4.0.alpha15.official [432b25d]

System information

Debian Linux X11 Xfce

Issue description

get_viewport().warp_mouse(get_viewport().get_mouse_position()) moves in some cases the mouse cursor to neighboring pixels.
I would expect, that the mouse cursor stays at the same location.

Example sequence of locations, where warp_mouse moves the cursor to:

Warp to viewports mouse position (193.4884, 172.1409)
Warp to viewports mouse position (192.8225, 172.2124)
Warp to viewports mouse position (192.1567, 172.284)

Seems like a rounding issue.
Related discussion: #88343

Bisected to #64574 (author seems no longer active)

Steps to reproduce

  1. Load and Start the MRP
  2. Randomly click with the left mouse button in the orange or in the green area
  3. In some cases the mouse cursor moves to a different pixel

Minimal reproduction project (MRP)

BugWarpMouse.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant