Moving cursor quickly jumps it out of the window when translating objects #39144

Open
opened 2014-03-12 22:19:01 +01:00 by gandalf3 · 25 comments
Member

System Information
Archlinux
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).
**System Information** Archlinux 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).
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @gandalf3

Added subscriber: @gandalf3

Added subscriber: @Sergey

Added subscriber: @Sergey

Added subscriber: @brecht

Added subscriber: @brecht

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, any thoughts?

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, any thoughts?

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Not really, @ideasman42 created this continuous grab system, he might know.

Not really, @ideasman42 created this continuous grab system, he might know.
Campbell Barton was assigned by Sergey Sharybin 2014-04-10 18:50:24 +02:00

@ideasman42, do you know? :)

@ideasman42, do you know? :)
Member

Added subscriber: @GregZaal

Added subscriber: @GregZaal
Member

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.

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.
https://developer.blender.org/diffusion/B/browse/master/intern/ghost/intern/GHOST_WindowX11.cpp$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: 3e3d2b7a4c

Since Blender is more stable now we could enable again.

This is because X11-Grab isn't being used at the moment. https://developer.blender.org/diffusion/B/browse/master/intern/ghost/intern/GHOST_WindowX11.cpp$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: 3e3d2b7a4c Since Blender is more stable now we could enable again.

set as todo: see http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface#Mouse_Support

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.

set as todo: see http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface#Mouse_Support 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.

This issue was referenced by 2b107beffd

This issue was referenced by 2b107beffd9b408ac1464288d07ee96214c09a30

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 2b107beffd.

Closed by commit 2b107beffd.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Ugh, tagged wrong bug in commit

Ugh, tagged wrong bug in commit

Added subscriber: @DavidJeske

Added subscriber: @DavidJeske

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.

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.

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.
Author
Member

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?

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?
Campbell Barton removed their assignment 2016-08-11 06:35:03 +02:00

Added subscriber: @jenkm

Added subscriber: @jenkm

Is this issue still present? Wasn't this fixed in d6fd03616e

Is this issue still present? Wasn't this fixed in d6fd03616e

Added subscriber: @PrototypeNM1

Added subscriber: @PrototypeNM1

@jenkm the linked issue is for redundant wrap accumulation, thus objects move off screen. This issue is about cursor escape.

@gandalf3 the likely reason is computation time difference between operators (including side effects). A faster operator is likely to either have fewer coalesced mouse events, thus more likely to catch it in the "warp zone" since cursor moves outside of the window are not handled.

@jenkm the linked issue is for redundant wrap accumulation, thus objects move off screen. This issue is about cursor escape. @gandalf3 the likely reason is computation time difference between operators (including side effects). A faster operator is likely to either have fewer coalesced mouse events, thus more likely to catch it in the "warp zone" since cursor moves outside of the window are not handled.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#39144
No description provided.