-
Notifications
You must be signed in to change notification settings - Fork 5
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
Torus mode - mouse gets stuck #35
Comments
Yes, this is actually expected behavior. In fact, I had to actually implement this behavior. :) The reason is that otherwise you can get nasty back-and-forth warping. The current implementation sets a boolean flag as soon as a warp has been issued. This prevents flags until the mouse is found anywhere but on a output border segment. I'm open to better ideas to handle these scenarios. |
Well with our torus metaphore, I think this definitely counts as a bug, because you can't get stuck on the edges of the torus because there aren't any. But I can see how you can get into endless warping loops at the edge so this is certainly a nasty "edge case" (no pun intended). Maybe I'll take a look at the code and come up with a way to fix it. |
Yeah. As I said, if there's a good fix, I'm all ears. :) One way to fix this is by not warping the pointer onto the edge of the target output, but one pixel next to it. But that is just unclean. I know it's just one pixel, but one pixel matters here. The relevant tests for this are
Imagine hitting the upper right edge of Implementation wise, the current fix for this is the FYI, note that this has nothing to do with the torus mode. It's a general problem. |
Here is a problem I have run into several times now. It may seem hard to reproduce under practical conditions, but I have run into this bug twice within the last hour.
To reproduce:
Turn torus mode on (with
-t
).Slowly move the mouse to touch the edge of the screen and then stop the mouse right after the warp.
Move the mouse in the opposite direction. It won't warp to where it came from. It's stuck.
You can "reset" the warping ability by moving the mouse forward and backward a little bit and the warping will happen again.
If this explanation was difficult to follow, I can write a longer more detailed example of the problem for you.
Relevant debug log:
The text was updated successfully, but these errors were encountered: