• 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
Re: NSScreen visibleFrame
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: [SOLVED] Re: [again] Add dynamically tool tip in NSMatrix
  • Next by Date: Re: [Seriously OT]Mac.com 60 days and counting
  • Previous by thread: NSScreen visibleFrame
  • Next by thread: Re: NSScreen visibleFrame
  • Index(es):
    • Date
    • Thread