• 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: NSWindow setIgnoresMouseEvents and Spaces
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow setIgnoresMouseEvents and Spaces


  • Subject: Re: NSWindow setIgnoresMouseEvents and Spaces
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Thu, 26 Jun 2008 11:56:08 +0200


Le 26 juin 08 à 11:26, Stefano Pigozzi a écrit :

Hello,

I'm modding Apple's RoundTransparentWindow sample in order to draw a gradient overlay on all the screen (to fix the non uniform lighting on my iMac's screen).

The applicazion works quite nicely but when I'm switching to another space using the 3d effect method my application doesn't ignores clicks anymore. If I switch spaces using hotkeys everything works fine. From what I can tell probably the space's 3d effect takes place in the NSScreenSaverWindowLevel too, and breaks someway the behaviour of my application.

This is taken from my NSWindow:

- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer: (BOOL)flag {

NSRect screenRect = [[NSScreen mainScreen] frame];
self->result = [super initWithContentRect:screenRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
[result setBackgroundColor: [NSColor clearColor]];
[result setLevel: NSScreenSaverWindowLevel];
[result setAlphaValue:1.0];
[result setOpaque:NO];
[result setHasShadow: NO];
[result setIgnoresMouseEvents: YES];
[result setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
return result;
}


This NSWindow contains only and NSView where I draw the gradient mentioned before.
Anyone can suggest a workaround to make this work?


regards
stefano

You can try with an higher window level.

[result setLevel:CGWindowLevelForKey(kCGOverlayWindowLevelKey)];


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: NSWindow setIgnoresMouseEvents and Spaces
      • From: Stefano Pigozzi <email@hidden>
References: 
 >NSWindow setIgnoresMouseEvents and Spaces (From: Stefano Pigozzi <email@hidden>)

  • Prev by Date: NSWindow setIgnoresMouseEvents and Spaces
  • Next by Date: Re: NSWindow setIgnoresMouseEvents and Spaces
  • Previous by thread: NSWindow setIgnoresMouseEvents and Spaces
  • Next by thread: Re: NSWindow setIgnoresMouseEvents and Spaces
  • Index(es):
    • Date
    • Thread