HumbleUI / JWM

Cross-platform window management and OS integration library for Java
Apache License 2.0
574 stars 46 forks source link

macOS: Pointer Lock API #252

Closed shaunlebron closed 1 year ago

shaunlebron commented 1 year ago

This helps prevent accidentally exiting the view when tracking touch points in #249.

Web:

Chromium:

macOS:

tonsky commented 1 year ago

Will you make a PR?

shaunlebron commented 1 year ago

PR is up. But I have to do some more digging to see how chromium adds the movementX and movementY properties to the mouse move event when pointer is locked.

edit: chromium just uses the deltaX and deltaY properties from the NSEvent

edit2: done