Re: How to find a window under the cursor
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