• 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
Re: How to find a window under the cursor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to find a window under the cursor


  • Subject: Re: How to find a window under the cursor
  • From: Jiri Volejnik <email@hidden>
  • Date: Fri, 2 Dec 2005 00:00:11 +0100

On Dec 1, 2005, at 22:31, Cybereer wrote:

Are you trying to find windows of other apps?
No, I don't.

If true, you could do a hit test for all onscreen windows. For windows of your own app, all you have to do is to call setAcceptsMouseMovedEvents and track the mouse enter by overriding -mouseEntered: method which works for background window.

You probably mean -mouseMoved:, not mouseEntered: message.

Tracking mouseMoved events works fine for me, there is no problem. But it tells me nothing about the window under the cursor! Events passed to mouseMoved: method contain a pointer to the main window, not the window under the cursor, as I already mentioned. If you move the cursor out of your window, or if you move it to another window of your app, by sending -window to the event you still get only a pointer to the main window! The message hitTest: works well, but one have to send it to the view of the right window, otherwise he can easily get nonsense, as the window may be overlapped by a floating panel, for example.

Regards,
Jiri


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: How to find a window under the cursor
      • From: Cybereer <email@hidden>
References: 
 >How to find a window under the cursor (From: Jiri Volejnik <email@hidden>)
 >Re: How to find a window under the cursor (From: Cybereer <email@hidden>)
 >Re: How to find a window under the cursor (From: Jiri Volejnik <email@hidden>)
 >Re: How to find a window under the cursor (From: Cybereer <email@hidden>)

  • Prev by Date: RE: Blocking Method Return
  • Next by Date: Re: Help on subclassing
  • Previous by thread: Re: How to find a window under the cursor
  • Next by thread: Re: How to find a window under the cursor
  • Index(es):
    • Date
    • Thread