Skip navigation.
 
mlRe: Full screen tiny issue
FROM : Nicholas Buratovich
DATE : Tue Jun 27 21:28:24 2006

Tue, 27 Jun 2006 07:20:15 -0400 Bobby B <<email_removed>> wrote:

> I'm trying to get my app to run full screen.  I want the title bar and
> menu bar to go away.  This works well:
>
> SetSystemUIMode(kUIModeAllHidden, nil);
>
> My windows, in Interface Builder, are all locked in at 0,0. However,
> when I run the app, there is a tiny gap (about 4 pixels) underneath
> the bottom of the window and the actual bottom of the scren (eg, you
> can see the background wallpaper under the window)
>
> Do you know what may be causing this?



You will see this behavior in other situations.  If you turn on Dock 
hiding, go into TextEdit (and most other basic apps), and zoom the 
window to fullscreen you will also see the 4 pixel gap appear.

What you need to do is create an NSWindow subclass and set your 
window's subclass to it.  In the subclass override 
constrainFrameRect:toScreen: and have it return whatever rect you 
want when you go into fullscreen mode (probably the size of the 
screen in your case).  Your window can now oversize the 4 pixel 
boundary and whatever other size limits you find.

If the window can be used while not in fullscreen mode you should 
rely on the superclass behavior in that situation.  You can create a 
boolean for the window subclass, set it when you enter and exit 
fullscreen, check to see if it is set in 
constrainFrameRect:toScreen:, and return either the superclass rect 
or your fullscreen rect depending on if you are fullscreen or not.

NSWindow delegate methods like windowWillResize:toSize: seem like 
they might be a nice alternative to subclassing, but I believe 
constrainFrameRect:toScreen: ends up getting called anyway so they 
won't work.

Let me know if this helps.

- Nicholas Buratovich

Related mailsAuthorDate
mlFull screen tiny issue Bobby B Jun 27, 13:20
mlRe: Full screen tiny issue Shawn Erickson Jun 27, 17:12
mlRe: Full screen tiny issue Drarok Ithaqua Jun 27, 17:27
mlRE: Full screen tiny issue Vinay Prabhu Jun 27, 17:31
mlRe: Full screen tiny issue Shawn Erickson Jun 27, 17:32
mlRE: Full screen tiny issue Ricky Sharp Jun 27, 18:55
mlRe: Full screen tiny issue Nicholas Buratovic… Jun 27, 21:28
mlRe: Full screen tiny issue Nicholas Buratovic… Jun 27, 21:55
mlRe: Full screen tiny issue Ricky Sharp Jun 28, 00:34