Re: classic floating window behavior?
Re: classic floating window behavior?
- Subject: Re: classic floating window behavior?
- From: m <email@hidden>
- Date: Wed, 31 Mar 2004 13:36:50 -0800
[trying to get a floating window to not float on top of all apps when
my app is deactivated]
On Mar 31, 2004, at 8:45 AM, M. Uli Kusterer wrote:
At 13:05 Uhr -0800 30.03.2004, m wrote:
[snip]
SetWindowClass((WindowRef)[mFloater windowRef], kFloatingWindowClass);
(mFloater in this case is a pre-existing NSPanel instantiated from
the Nib file.) In this instance, I got a floating window that still
floats above all app windows.
Okay, then it looks like I simply remembered something of the way it
worked in OS 9. This definitely used to work this way in Carbon, but I
guess they don't have any application-specific layers in OS X anymore.
I see one more venue to investigate:
Use setLevel: to move your window into the document layer, and use a
category to replace orderFront: and any other window-order-changing
methods with a method that does the same as orderFront: (never done
this, but I heard it is messy because you need to get the IMP of the
original method to be able to call it and only *then* load the
category, e.g. from a bundle) and afterwards sends all your floaters
an orderFront: as well.
Actually, what seems to work ok is doing a setLevel:NSNormalWindowLevel
on floater on app deactivate and restoring it to NSFloatingWindowLevel
on app activate. Sort of hacky but not too bad.
I take your point on submitting this an enhancement request...
_murat
_______________________________________________
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.