Commit Graph

4 Commits

Author SHA1 Message Date
Tim Clem 599ecd97a8 winemac.drv: Use -setMouseConfinementRect: for cursor clipping by default.
On macOS 10.13+, use this private NSWindow method for ClipCursor
calls. The old behavior can be restored by setting the per-app Mac
Driver registry key UseConfinementCursorClipping to N.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 22:47:13 +01:00
Tim Clem 648fcd1882 winemac.drv: Add a cursor clipping implementation using -setMouseConfinementRect:.
This 10.13+ API is far simpler than the CGEventTap approach, and does
not require Accessibility permissions. It is not currently not enabled.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 22:47:11 +01:00
Tim Clem 7bd72959a3 winemac.drv: Factor common cursor clipping methods into functions.
Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 22:47:08 +01:00
Tim Clem 1c80eb5e5b winemac.drv: Factor out cursor clipping code to its own class.
Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 22:47:04 +01:00