NSWindow setIgnoresMouseEvents and Spaces
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