Re:Getting mouse moved events on overlay windows
Re:Getting mouse moved events on overlay windows
- Subject: Re:Getting mouse moved events on overlay windows
- From: "Shripada Hebbar" <email@hidden>
- Date: Wed, 02 Jul 2008 10:40:04 +0530
If your app is Leopard only, you better take a look into
NSTrackingArea at:
http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/TrackingAreaObjec
ts/chapter_7_section_4.html#//apple_ref/doc/uid/10000060i-CH8-DontLinkElementID_30
-Shripada
> Hi Markus,
>
> I ran into exactly the same problem; my view was in a transparent,
> borderless, and nonactivating panel. It didn't get mouse moved
> events, and tracking rectangles didn't work either. (My problem was
> that I wanted to change the cursor when it was inside my view, but it
> never worked).
>
> I eventually concluded that "Cocoa doesn't expect you to be interested
> in mouse moved events or setting the cursor for a window that's not
> active" and gave up. I suspected at the time that it was the
> "nonactivating" property of the panel that was causing the issue.
>
> If you get any further, I'd be keen to hear what you find out.
>
> Cheers,
> Brett
>
>
>
>
>
>
> On 01/07/2008, at 4:52 PM, Markus Spoettl wrote:
>
> > Hello List,
> >
> > I have a WebView with a transparent overlay window + custom view
> > "attached" it to allow for custom overlay drawing on top of what the
> > WebView displays. This works very well.
> >
> > However, I can't figure out a way to get -mouseMoved: messages on
> > the overlay window's view. Tracking areas as well as -mouseMoved:
> > messages (with setting acceptsMouseMovedEvents:YES on the overlay
> > window) don't work because the overlay window is borderless
> > (NSBorderlessWindowMask) and transparent and the framework does not
> > send those messages to it.
> >
> > So I thought, I go through a WebView subclass, establishing the
> > tracking area there and forward the mouse messages to the overlay
> > window and its view manually. Unfortunately this doesn't work either
> > because the tracking area events are only firing if there is no
> > overlay.
> >
> > The overlay view does get -mouseDown:, -mouseUp: and -mouseDragged:
> > events, but not -mouseMoved:. I'm pretty out of ideas, how can I get
> > -mouseMoved: messages on the overlay window?
> >
> > Thanks for any input!
> >
> > Regards
> > Markus
>
>
>
>
>
-----------------------------------------------
Robosoft Technologies - Come home to Technology
Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
_______________________________________________
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