Re: Turn off background click behavior on a window?
Re: Turn off background click behavior on a window?
- Subject: Re: Turn off background click behavior on a window?
- From: Steve Mills <email@hidden>
- Date: Wed, 29 Oct 2014 11:16:11 -0500
On Oct 29, 2014, at 11:05:42, Jonathan Mitchell <email@hidden> wrote:
> I created a sample project with a single NSWindow and content view subclass like so:
> @implementation TestView
>
> - (void)mouseDown:(NSEvent *)theEvent
> {
> NSLog(@"Mouse down");
> }
>
> /*
> - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
> {
> return YES;
> } */
>
> @end
>
> It seems to behave as the docs suggest on OS X 10.9.
> Perhaps your app has some additional event handling in place.
I tried that as well, but returned NO from acceptsFirstMouse:. It still came forward and clicked subviews when I clicked them in the background. Did you add subviews inside your subclass view and try clicking those while your app was in the background? My app doesn't have any special event handling. I might try overriding sendEvent:, but that just seems so brute-force when there should be a way to tell the window to just come forward and ignore clicks like all windows used to do.
--
Steve Mills
Drummer, Mac geek
_______________________________________________
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