Re: NSScreen visibleFrame
Re: NSScreen visibleFrame
- Subject: Re: NSScreen visibleFrame
- From: Brock Brandenberg <email@hidden>
- Date: Wed, 17 Jul 2002 14:27:59 -0500
Hi Jeremy.
>
Does anyone know of a bug in NSScreen's -visibleFrame method? Whenever I
>
use it (whether to put up a full-screen backdrop or determine the
>
placement of a window), I find it leaves a gap about 3 pixels deep along
>
the bottom of the screen. This means I have to use a very laborious
>
method involving [myScreen frame] (for calculations relating to the
>
bottom edge) and [myScreen visibleFrame] (for calculations using the
>
bottom of the menu bar). It's very tedious - and so is the alternative,
>
creating a rect based on visibleFrame with adjustments to its height and
>
origin.
>
>
Is this a bug, or what? And is there a less laborious workaround?
The method visibleFrame: takes the menu bar and the dock areas into account,
so I have assumed that is returning a "safe zone", not a rect that bumps
directly against visible menu bar and dock pixels. If the dock is hidden, I
believe the visibleFrame will even exclude the small (apparently 3 pixel)
mouse-over, hot zone along the edge where the dock is hidden/positioned.
You may need to use the NSScreen frame value and the Carbon call
GetMBarHeight() if you want the exact height of the screen minus the menu
bar.
Brock Brandenberg
----- industrial design @ www.bergdesign.com ------
_______________________________________________
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.