Cursor outside Rect without polling
Cursor outside Rect without polling
- Subject: Cursor outside Rect without polling
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Tue, 20 Jun 2017 10:17:49 +0700
macOS.
Some Cocoa app wants to know whether the cursor moved from any point to a point
outside of some rect.
Currently I use polling (which looks kind of inefficient).
I tried NSTrackingArea, but this does not work:
1. if the cursor is initially NOT in the rect, the app does not get notified:
Workaround: user moves cursor into the rect (not very good).
2. if the app is hidden under some other windows, it also does not get notified.
Workaround: user removes covering windows of other apps, then moves cursor into
the rect (even worse).
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden