-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
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
Fix warp_mouse for transient windows, fix mouse jumping around when spinbox released #64574
Fix warp_mouse for transient windows, fix mouse jumping around when spinbox released #64574
Conversation
5f45bee
to
c01a588
Compare
c01a588
to
c35e50b
Compare
Anyone knows what the |
Rebase your PR to fix it (see https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html#the-interactive-rebase). There was a change to GDExtension API, it's unrelated to this PR, but CI is pulling the latest version of |
c35e50b
to
33e4353
Compare
Of course! It should have been obvious, thanks alot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those 2 problems where notices on Linux(Ubuntu) + X11, i don't know about the other os)
Both issues are reproducible on macOS as well, so it's probably relevant for all platforms, and both issues are fixed by this PR.
Code seems fine, but need to account for single-window mode.
… releasing mouse for spinbox
33e4353
to
5ac5c8b
Compare
Thanks! |
Problem
When using the spinbox on a transient window, releasing the mouse after a drag (to increase/decrease value) put the cursor in the wrong place.
bugshowcase-2022-08-18_16.09.52.mp4
At the same time, i also fixed a small annoyance: when releasing after drag, the cursor jumped around instead of appearing directly at the correct position
bugshowcase2-2022-08-18_16.10.47.mp4
(Those 2 problems where notices on Linux(Ubuntu) + X11, i don't know about the other os)
Reproduce the problems
To reproduce the problems, you need to create a simple editor plugin :
Then just create a simple test scene with a spinbox inside it, then try to drag to change the spinbox's value
Fix
The proposed fix in this commit fixes both of those problems, but changing warp_mouse to a virtual function will decrease performance a bit, but i seemed like the cleanest approach.