Page MenuHome

[testing] GHOST/X11: Warp cursor on the spot
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Nov 19 2022, 11:49 PM.

Details

Reviewers
None
Summary

Instead of warping in a small region, a hidden cursor grab now warps on the spot.


This is an alternative X11 fix to rB9fd6dae7939a: Fix T102346: Mouse escapes window during walk navigation.

This needs further testing, there is a problem with this method where an event queue may accumulate and apply multiple delta's before the cursor is reset to the center point.

It may be possible to resolve this using timers, although there doesn't seem to be a straightforward way to access time compatible with the X11 events Time. (the only method I found is fairly involved see: https://stackoverflow.com/a/67986496/432509).

Creating this diff for reference as I think this method is preferable if detecting cursor reset can be done reliably.

Diff Detail

Repository
rB Blender
Branch
TEMP-WARP-ON-SPOT-X11 (branched from master)
Build Status
Buildable 24742
Build 24742: arc lint + arc unit

Event Timeline

Campbell Barton (campbellbarton) created this revision.
Campbell Barton (campbellbarton) retitled this revision from [WIP] Warp on the spot for X11 to [testing] GHOST/X11: Warp on the spot for X11.Nov 20 2022, 12:01 AM
Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)
Campbell Barton (campbellbarton) retitled this revision from [testing] GHOST/X11: Warp on the spot for X11 to [testing] GHOST/X11: Warp cursor on the spot.