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

NSWindow setIgnoresMouseEvents and Spaces


  • Subject: NSWindow setIgnoresMouseEvents and Spaces
  • From: Stefano Pigozzi <email@hidden>
  • Date: Thu, 26 Jun 2008 11:26:22 +0200

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
_______________________________________________

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: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: NSTrackingArea message lag
  • Next by Date: Re: NSWindow setIgnoresMouseEvents and Spaces
  • Previous by thread: Re: [NSOutlineView] Saving/Restoring the hierarchy disclosure state (Reloaded)
  • Next by thread: Re: NSWindow setIgnoresMouseEvents and Spaces
  • Index(es):
    • Date
    • Thread