• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cursor outside Rect without polling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Cursor outside Rect without polling
      • From: Quincey Morris <email@hidden>
  • Prev by Date: NSTimer or what?
  • Next by Date: Re: Cursor outside Rect without polling
  • Previous by thread: Re: NSTimer or what?
  • Next by thread: Re: Cursor outside Rect without polling
  • Index(es):
    • Date
    • Thread