Re: How to do the opposite of global floating window
Re: How to do the opposite of global floating window
- Subject: Re: How to do the opposite of global floating window
- From: Andreas Mayer <email@hidden>
- Date: Tue, 31 Dec 2002 14:06:47 +0100
Am Montag, 30.12.02 um 17:48 Uhr schrieb Joe Blowson:
My goal is to have this window simply float over the desktop and under
all other windows at all times. The user never needs to directly
interact with this window.
Make it a borderless window, set its window level to
kCGDesktopWindowLevel and make it clickthrough.
NSWindow* window = [super initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered
defer:NO];
[window setBackgroundColor: [NSColor clearColor]]; // transparent
window
[window setAlphaValue:1.0]; // we want our drawings to be opaque
[window setOpaque:NO];
[window setLevel: kCGDesktopWindowLevel];
/* carbon */
void *ref = [window windowRef];
ChangeWindowAttributes(ref, kWindowIgnoreClicksAttribute,
kWindowNoAttributes);
// to reset: ChangeWindowAttributes(ref, kWindowNoAttributes,
kWindowIgnoreClicksAttribute);
/* cocoa */
[window setIgnoresMouseEvents:YES];
bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.