UI: Win32 Warp Margin Adjustment
Windows mouse warping bounds margin needs to be different when not GHOST_kGrabHide, or else the visible wrapping occurs within the area at an odd location. Making it 2, like it used to be.
This commit is contained in:
parent
67e4af3ea1
commit
6aeadce34b
@ -1134,7 +1134,9 @@ GHOST_EventCursor *GHOST_SystemWin32::processCursorEvent(GHOST_WindowWin32 *wind
|
||||
* every motion, see: D16558 (alternative fix for #102346). */
|
||||
|
||||
/* Rather than adjust the bounds, use a margin based on the bounds width. */
|
||||
int32_t bounds_margin = bounds.getWidth() / 10;
|
||||
int32_t bounds_margin = (window->getCursorGrabMode() == GHOST_kGrabHide) ?
|
||||
bounds.getWidth() / 10 :
|
||||
2;
|
||||
GHOST_TAxisFlag bounds_axis = window->getCursorGrabAxis();
|
||||
|
||||
/* Could also clamp to screen bounds wrap with a window outside the view will
|
||||
|
Loading…
Reference in New Issue
Block a user