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
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:mime-version:subject:date:x-mailer; bh=7pIMpuRI6cI+XOzGjOFXZQQExpZqXQ0jpGe+sYo1NNE=; b=LkkvOaeuN2XyhnBsHWQBR4o4BG689tXwTQ8HyGJso7A/uE+OFmhT811kBWZCPFSFDf 9BJjIAKWk8QxJ182UjO2966lP3YZDKYonMoDwSkGsPjJyEFsi0i9ODIVIagkD5UnFcuQ YrWQZaAtoJ59ipB3s4Wjba2u3s8R2q+WyGCYk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:mime-version:subject:date:x-mailer; b=IX6YBUvbpd3izPI/RVKtuyrmyDGHkAn6+JDydoABhNqYuJob+A3vHxoqitvfsRC+Ns LOoIhTL93kg0plaQwwO266d6DNpftcV7CLkUZrjGvfqHY1bp25l6fb9RYry7ojNwFlTc V1eGeHlCOxiAz8DlToRuLDKc1anZh7soRcJSA=
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
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.