• 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
Window levels - is this safe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Window levels - is this safe?


  • Subject: Window levels - is this safe?
  • From: Keith Blount <email@hidden>
  • Date: Wed, 26 Jul 2006 00:50:11 -0700 (PDT)

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Window levels - is this safe?
      • From: Michael Watson <email@hidden>
  • Prev by Date: Re: ZIP archives
  • Next by Date: Re: Window levels - is this safe?
  • Previous by thread: Re: When does an NSTableView drag and which column did it drag to?
  • Next by thread: Re: Window levels - is this safe?
  • Index(es):
    • Date
    • Thread