WIP: Fix #109968: Win32 Mouse Warp Bounds #110937
No reviewers
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#110937
Loading…
Reference in New Issue
No description provided.
Delete Branch "Harley/blender:WarpBounds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Use Cursor Grab bounds, rather than a portion of the window bounds, for
GHOST_kGrabHide
I was asked to look at this by @ideasman42 but this will probably require some consultation with him because this area of code has some odd history.
The minimum changes I can make to fix the reported behavior is just this:
I can't find any reason why we want to wrap on a bounds smaller than the window (or grabBounds if set) when in GrabHide. So this PR just removes this in a nicer way than above.
@PratikPB2123 - can you test?
First of all, it would be good to find the root cause of #109968, if the cursor is hidden it should not matter where it's wrapped internally.
The intended behavior is:
If these steps are not working properly, that seems like a bug in hiding/restoring the cursor, not in it's wrapping.
It would be good to attempt to resolve this problem at the level of hiding/restoring instead of changing internal wrapping logic.
If that's not possible a detailed explanation should be included for why a hidden cursor's location matters on WIN32 that is different from other platforms.
From looking at the video it seems the cursor is being made visible when it shouldn't be (although the screen-recording software could be adding in a software cursor). That doesn't account for the cursor being warped to a different location once color picking is complete.
The change to
GHOST_Window.cc
looks like it will impact other platforms, it may be OK but I couldn't say for sure without checking. For an isolated fix, I'd rather remove this change, perform the spesific check in GHOST/Win32 and consider a change that impacts all platforms separately (testing X11/Wayland/macOS to see it's not causing problems).@Harley , this restores 3.3 behavior (last working version) i.e. both the issues mentioned in the #109968 do not appear anymore with PR applied
In some cases, cursor is visible (even in 3.3) during click-drag on redo panel properties, I'm not sure why.
Actually, reporter is just clicking at random points (and not click-dragging 😅 )
With this patch applied I can still get the mouse to escaped as described in #102346. Frustratingly this happens even if I use a Windows API call (ClipCursor) to keep it within bounds.
It isn't that the cursor is moved to a different location at the end of color picking. It is more that it unexpectedly moves there while doing multiple short and fast little drags within the area. That unexpected move is outside of the "mouse close" bounds and that ends the operation.
So far not having a lot of luck here.
Fix #109968: Win32 Mouse Warp Boundsto WIP: Fix #109968: Win32 Mouse Warp BoundsAlternate fix #111020 by @guishe does not have the bad "mouse escape" behavior from #102346.
Closing in favor of #113066
Pull request closed