Re: Ignore hide messages sent to my application?
Re: Ignore hide messages sent to my application?
- Subject: Re: Ignore hide messages sent to my application?
- From: Manfred Schwind <email@hidden>
- Date: Wed, 14 Dec 2005 10:09:36 +0100
Thank you, but I was hoping for a solution other than this as well.
There is some undocumented way to make a window "sticky" so that it
is ignored by Exposé and Hide etc. But I would not recommend to use
undocumented features because your application may break in some
future version of Mac OS X.
If you really, really have (or want ;-)) to, you could e.g. do the
following in an NSWindow subclass - but it's a hack!
Most probably there are better ways to solve your problem.
typedef int CGSConnection;
typedef int CGSWindow;
extern CGSConnection _CGSDefaultConnection(void);
extern OSStatus CGSGetWindowTags(const CGSConnection cid, const
CGSWindow wid, int *tags, int thirtyTwo);
extern OSStatus CGSSetWindowTags(const CGSConnection cid, const
CGSWindow wid, int *tags, int thirtyTwo);
- (void)setSticky:(BOOL)flag
{
CGSWindow wid = [self windowNumber];
CGSConnection cid = _CGSDefaultConnection();
int tags[2] = {0, 0};
if (CGSGetWindowTags(cid, wid, tags, 32) == noErr) {
if (flag) {
tags[0] |= 0x800;
} else {
tags[0] &= ~0x800;
}
CGSSetWindowTags(cid, wid, tags, 32);
}
}
Regards,
Mani
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden