Re: Unable to recieve mouse moved events on NSBorderless window
Re: Unable to recieve mouse moved events on NSBorderless window
- Subject: Re: Unable to recieve mouse moved events on NSBorderless window
- From: Andy Lee <email@hidden>
- Date: Thu, 21 Jan 2010 01:24:08 -0500
On Jan 20, 2010, at 5:05 PM, Quincey Morris wrote:
> On Jan 20, 2010, at 05:33, Poonam Virupaxi Shigihalli wrote:
>
>> I am using NSBorderless window style mask for window to set in full screen mode. I am unable to recieve the mouse moved event on borderless window.
>> If I set the window style mask to titled I am able to recieve mouse moved events.
>>
>> I have set in awake from nib
>> [window setAcceptsMouseMovedEvents:YES];
>>
>> And using mousemoved: function to detect the event.
>
> This is not an answer to your actual question (apart from noting that window behavior is famous for being different in non-standard window configurations), but you might be able to bypass your problem by using NSTrackingArea (Leopard and later) instead.
>
> The side benefit of this is that tracking mouse movements with tracking areas is (likely) somewhat more efficient overall than using the older almost-deprecated 'setAcceptsMouseMovedEvents:YES' technique.
I dealt with a similar problem recently (though not so recently that I remember the details), and going with NSTrackingArea was the solution. I discovered that the setAcceptsMouseMovedEvents: technique only works with the key window or with views that are first responder, or something like that. I'm pretty sure something in the list archives got me on the right track, possibly this: <http://www.cocoabuilder.com/archive/cocoa/31206-capture-mousemoved-under-nsview.html#31201>.
--Andy
_______________________________________________
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