• 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: Turn off background click behavior on a window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Turn off background click behavior on a window?


  • Subject: Re: Turn off background click behavior on a window?
  • From: Jonathan Mitchell <email@hidden>
  • Date: Wed, 29 Oct 2014 16:24:49 +0000



> On 29 Oct 2014, at 16:16, Steve Mills <email@hidden> wrote:
>
> 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?
Yes. Works as docs suggest on 10.9 and 10.10.

> 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.
>
Does sound like overkill. I would put together a trivial test project and work back from there.

J


_______________________________________________

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


  • Follow-Ups:
    • Re: Turn off background click behavior on a window?
      • From: Steve Mills <email@hidden>
References: 
 >Turn off background click behavior on a window? (From: Steve Mills <email@hidden>)
 >Re: Turn off background click behavior on a window? (From: Jonathan Mitchell <email@hidden>)
 >Re: Turn off background click behavior on a window? (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Turn off background click behavior on a window?
  • Next by Date: Re: Turn off background click behavior on a window?
  • Previous by thread: Re: Turn off background click behavior on a window?
  • Next by thread: Re: Turn off background click behavior on a window?
  • Index(es):
    • Date
    • Thread