Skip navigation.
 
mlRe: Window levels - is this safe?
FROM : Michael Watson
DATE : Wed Jul 26 09:56:40 2006

Look into SetSystemUIMode:

http://developer.apple.com/technotes/tn2002/tn2062.html

The shielding window level can be obtained via CGShieldingWindowLevel
() and used with NSWindow's -setLevel: method, but I've been told 
there may be a more future-proof way of accomplishing this part of 
the task.


--
Michael Watson

On 26 Jul, 2006, at 03:50, Keith Blount wrote:

> Hello,
>
> My app can launch into full screen and I have been
> having some problems getting the behaviour I want
> between application switching and expose in this mode.
>
> My problem is that while in full screen, if the user
> switches to expose, as in iPhoto, he or she should see
> the window's main window, not the full screen window,
> but clicking on it should bring back up the full
> screen window. Switching between applications should
> hide the full screen window, but clicking back on the
> main window when switching back to my app should bring
> up full screen again. This is all pretty much standard
> full screen behaviour, but achieving it is a little
> more difficult than it first seems.
>
> I found that I could get most of the behaviour I want
> like this:
>
> [fsWindow setFloatingPanel:YES]; // fsWindow is
> actually an NSPanel subclass
> [fsWindow setHidesOnDeactivate:YES];
>
> That hides the full screen window from expose, plays
> nicely with other apps, and would, for most full
> screen modes, be fine. However, my full screen window
> has several other floating panels that can appear over
> the top of it. Using this code means that if my full
> screen window gets clicked, the other floating panels
> disappear behind it.
>
> I eventually figured out that what I wanted was
> something between normal window level and floatig
> window level, so, seeing that there seems to be no
> such level defined, tried both of the following:
>
> [fsWindow setLevel:NSFloatingWindowLevel-1];
>
> and
>
> [fsWindow setLevel:NSNormalWindowLevel+1];
>
> It turns out that either of these work perfectly fine,
> and get the exact behaviour I want - my full screen
> window is now hidden from expose but doesn't obscure
> other floating panels, and it plays well with other
> apps.
>
> But how safe is using an undefined window level like
> this? I'm sure that the answer is, it's safe until
> Apple decide to use that window level for something
> else, so my real question then would be, is there a
> better way of going about what I want to achieve?
>
> Many thanks in advance,
> Keith
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/mikey-san%
> 40bungie.org
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlWindow levels - is this safe? Keith Blount Jul 26, 09:50
mlRe: Window levels - is this safe? Michael Watson Jul 26, 09:56
mlRe: Window levels - is this safe? Keith Blount Jul 26, 11:53
mlRe: Window levels - is this safe? Ricky Sharp Jul 26, 13:44
mlRe: Window levels - is this safe? Keith Blount Jul 26, 15:13
mlRe: Window levels - is this safe? Ricky Sharp Jul 26, 20:07
mlRe: Window levels - is this safe? Keith Blount Jul 26, 22:37