Question

How can I clip the mouse movement into a window Region using Carbon?

Was it helpful?

Solution

I don't think there is any simple way to do it, and that's good... it's a "non-Mac-like" behavior that will freak out your users. That said, it would probably be possible to use CGAssociateMouseAndMouseCursorPosition to uncouple the mouse from the cursor position, then monitor mouse events and move the cursor to where you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top