Cursor: add on-focus-change option

Warp the cursor to the center of the focused view if the cursor is not
in the bounding box of that view already. This helps the user to keep
track of their cursor when they mostly use the keyboard and the cursor
becomes hidden most of the time, also helps trackpad/trackpoint users.
This commit is contained in:
shironeko
2022-08-01 20:31:50 -04:00
committed by Isaac Freund
parent 3141940efb
commit 8036ae2bd1
7 changed files with 65 additions and 26 deletions

View File

@ -307,12 +307,14 @@ A complete list may be found in _/usr/include/linux/input-event-codes.h_
Hide the cursor when pressing any non-modifier key. Show the cursor
again on any movement.
*set-cursor-warp* *disabled*|*on-output-change*
*set-cursor-warp* *disabled*|*on-output-change*|*on-focus-change*
Set the cursor warp mode. There are two available modes:
- _disabled_: Cursor will not be warped. This is the default.
- _on-output-change_: When a different output is focused, the cursor will be
warped to its center.
- _on-focus-change_: When a different view/output is focused, the cursor will be
warped to its center.
*set-repeat* _rate_ _delay_
Set the keyboard repeat rate to _rate_ key repeats per second and