• 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
Re: Ignore hide messages sent to my application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Ignore hide messages sent to my application? (From: Stephen Zyszkiewicz <email@hidden>)
 >Re: Ignore hide messages sent to my application? (From: Shawn Erickson <email@hidden>)
 >Re: Ignore hide messages sent to my application? (From: Stephen Zyszkiewicz <email@hidden>)
 >Re: Ignore hide messages sent to my application? (From: Andreas Mayer <email@hidden>)
 >Re: Ignore hide messages sent to my application? (From: Stephen Zyszkiewicz <email@hidden>)

  • Prev by Date: Re: Shadowed text view
  • Next by Date: CoreData, Two Nibs and Bindings
  • Previous by thread: Re: Ignore hide messages sent to my application?
  • Next by thread: Setters, Getters and efficiency
  • Index(es):
    • Date
    • Thread