Page MenuHome

Moving cursor quickly jumps it out of the window when translating objects
Confirmed, NormalPublicTO DO


System Information
Nvidia GTX 460

Blender Version
Broken: 2.7 RC1

Short description of error
It's possible to escape the window by moving the mouse quickly while translating an object. This does not seem to be possible while moving the view.

Exact steps for others to reproduce the error

  1. Open blender in windowed mode with some space at the top of the screen
  2. Open default startup file (load factory settings)
  3. Select the default cube and press G+Z, then move the mouse sharply upwards as fast as possible (I don't actually need to move it that quickly, it's happened several times by mistake. But just to be sure.). The cursor will escape the window (will not wrap).
  4. Try the same with rotating the view (press and hold MMB, move mouse upwards quickly). The cursor will not escape, even when going at least as fast as when translating objects (sometimes the cursor will appear outside the window, but it still wraps).

Revisions and Commits

Event Timeline

Ellwood Zwovic (gandalf3) raised the priority of this task from to 90.
Ellwood Zwovic (gandalf3) updated the task description. (Show Details)
Ellwood Zwovic (gandalf3) edited a custom field.
Sergey Sharybin (sergey) lowered the priority of this task from 90 to Normal.Mar 13 2014, 8:54 AM

Wouldn't really consider this is a bug, more like a specific of how warping works for continuous grab. It could be improved by seeing "aha, cursor is leaving the window so let's transwarp beam cursor back to the window". But that's kind of arbitrary and could break stuff like focus change and so.

@Brecht Van Lommel (brecht), any thoughts?

Not really, @Campbell Barton (campbellbarton) created this continuous grab system, he might know.

As far as I can see, the issue occurs when the mouse is moved quickly and escapes the boundaries of the blender window, so that when it's teleported to the other size, it comes with an extra (perhaps double?) translation.

It could possibly be solved by having the cursor teleport to the opposite side before actually reaching the edge of the window, perhaps even something so much as 50 pixels from the border, since the border is actually irrelevant during an operation with continuous grab.

This is because X11-Grab isn't being used at the moment.$76

Using the OS's grab is nice, but I disabled it because it could lock X11 (no easy way to ungrab unless you know to Ctrl+Alt+FKey to login to a shell & kill the application grabbing the cursor).
See: rB3e3d2b7a4cfc38f673bdeb48707b95c7bd50049a

Since Blender is more stable now we could enable again.

Campbell Barton (campbellbarton) edited a custom field.

set as todo: see

If its possible to drag the subsurf levels up to a high value without locking the OS (where most users would have to hard-reboot), then cursor grabbing can be enabled again.

Campbell Barton (campbellbarton) changed the task status from Resolved to Unknown Status.Nov 10 2014, 9:00 PM

Ugh, tagged wrong bug in commit

One common solution to this problem is to do continuous grab by hiding the mouse and continually re-positioning the mouse to the center of the application window.

This way, no matter where the mouse was when the grab was started, it's pretty unlikely to leave the window in between runs of the event loop. When the grab is done, the mouse is returned to its original location and shown again.

Right, we do this already for number-button editing (constrain to a very small area at least).

We could do this for all wrapped mouse-cursor usage, but it is nice to have some kind of cursor on the screen.

A solution could be to draw a fake cursor, but internally to the location resetting trick.

What I find strange is that the cursor warp used while rotating the view seems unbreakable.
Even if the cursor is moving fast enough to be briefly drawn far outside the window, blender warps it back no problem.
Only translations seem to allow the cursor to escape in this manner.

What's different about the view-rotate cursor warp?