Mouse cursor stays in-place with Ghost/Wayland for operators that grab cursor input #77311

Closed
opened 2020-06-03 16:48:44 +02:00 by Campbell Barton · 8 comments

Currently actions that grab such as scrubbing the frame in the timeline keep the cursor still while the frame indicator moves.

This also happens when painting in the image space.

Reporting this to keep track of GHOST/Wayland issues.

Currently actions that grab such as scrubbing the frame in the timeline keep the cursor still while the frame indicator moves. This also happens when painting in the image space. Reporting this to keep track of GHOST/Wayland issues.
Author
Owner

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Campbell Barton changed title from Mouse cursor stays in-place with Ghost/Wayland to Mouse cursor stays in-place with Ghost/Wayland for operators that grab cursor input 2020-06-03 16:59:24 +02:00

Added subscriber: @christian.rauch

Added subscriber: @christian.rauch

As far as I know, a proper pointer wrapping-around is currently not possible with the protocols that are available.

The GrabNormal and GrabWrap are implemented by locking the pointer in place and only using its relative position/movement. This achieves the expected effect on GUI elements but does not update the actual cursor position. From the desktops view the cursor position is fixed, while for Blender the cursor position moves on an infinite plane.

Addendum: The visual effect of cursor wrapping could, of course, be achieved by the manual wrapping of "visible" coordinates and client-side rendering of the cursor image.

However, I actually do not see a proper application of wrapped around pointer coordinates in Blender. On X11, moving an object (Shift+Spacebag -> G, or just 'g') will wrap around the cursor position within the 3D viewport area, but the object, i.e. its position, will not wrap around this area. The same goes for the timeline: dragging the timemark outside the right side of the timeline will wrap around the cursor but not the timemark value.

In summary, with these cases on X11, the pointer's absolute cursor position on the screen does not relate to the state of the UI element that is manipulated. Once the absolute cursor position wraps around the first time, the UI element beneath the cursor (object, timemark) becomes invisible and the cursor position from thereon does not reflect the state of the UI element anymore.

I personally find this very confusing and actually prefer the current grabbing behaviour where the cursor image is fixed and the UI element is updated by relative pointer movements.

As far as I know, a proper pointer wrapping-around is currently not possible with the protocols that are available. The `GrabNormal` and `GrabWrap` are implemented by locking the pointer in place and only using its relative position/movement. This achieves the expected effect on GUI elements but does not update the actual cursor position. From the desktops view the cursor position is fixed, while for Blender the cursor position moves on an infinite plane. Addendum: The visual effect of cursor wrapping could, of course, be achieved by the manual wrapping of "visible" coordinates and client-side rendering of the cursor image. However, I actually do not see a proper application of wrapped around pointer coordinates in Blender. On X11, moving an object (Shift+Spacebag -> G, or just 'g') will wrap around the cursor position within the 3D viewport area, but the object, i.e. its position, will not wrap around this area. The same goes for the timeline: dragging the timemark outside the right side of the timeline will wrap around the cursor but not the timemark value. In summary, with these cases on X11, the pointer's absolute cursor position on the screen does not relate to the state of the UI element that is manipulated. Once the absolute cursor position wraps around the first time, the UI element beneath the cursor (object, timemark) becomes invisible and the cursor position from thereon does not reflect the state of the UI element anymore. I personally find this very confusing and actually prefer the current grabbing behaviour where the cursor image is fixed and the UI element is updated by relative pointer movements.
Author
Owner

Even if the current behavior is preferred under some conditions, it feels like a bug - especially when painting for example.

Even if the current behavior is preferred under some conditions, it feels like a bug - especially when painting for example.

Revisiting this. I think emulating the X11 behaviour of wrapping the cursor image would require drawing the cursor client-side, i.e. by Blender.

If the sticking cursor for the timeline is undesired, maybe we can hide the cursor just like for dragging the coordinate axes in the top right for changing the orientation?

Is there any UI interaction in Blender that would be blocked or made impossible by the current implementation in Wayland?

Revisiting this. I think emulating the X11 behaviour of wrapping the cursor image would require drawing the cursor client-side, i.e. by Blender. If the sticking cursor for the timeline is undesired, maybe we can hide the cursor just like for dragging the coordinate axes in the top right for changing the orientation? Is there any UI interaction in Blender that would be blocked or made impossible by the current implementation in Wayland?
Author
Owner

Looked into this and agree that a client side cursor is the only practical solution given that Wayland completely disallows cursor-warping by the client.

I've been using Blender in Wayland recently and while some cases are arguably acceptable as-is (time-line panning is one of them).
There are other cases where this is practically unusable.

  • Anything relating to painting where the cursor remains still and the paint-brush stroke moves.
  • The "Curve" grease pencil tool grabs the cursor, entering a mode where points can be selected but it's not possible to see the location of the cursor before the points are selected.

In these cases some kind of cursor indicator is needed.

Looked into this and agree that a client side cursor is the only practical solution given that Wayland completely disallows cursor-warping by the client. I've been using Blender in Wayland recently and while some cases are arguably acceptable as-is (time-line panning is one of them). There are other cases where this is practically unusable. - Anything relating to painting where the cursor remains still and the paint-brush stroke moves. - The "Curve" grease pencil tool grabs the cursor, entering a mode where points can be selected but it's not possible to see the location of the cursor before the points are selected. In these cases some kind of cursor indicator is needed.

This issue was referenced by a1d2efd190

This issue was referenced by a1d2efd190038c7615bd3bb459dc86c8b3a8ecdc
Author
Owner

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
Campbell Barton self-assigned this 2022-06-08 05:17:18 +02:00
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
3 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#77311
No description provided.