How to get real available top on MacOS

Hi there,

My App used to work properly until a few MacOS updates.

Now, I am not able to find the real available top when I’m creating a new document and I want to display a window at the top of the screen.

Indeed, with MacOS, there is a top bar menu, and after some trials I get while moving a window:

  • min top: 71 (I cannot move the window higher)
  • screen AvailableTop: 39
  • screen AvailableTop x Scale Factor: 39 x 2 = 78

Why can I move the window to 71 and AvailableTop doesn’t match this number, even taking in count the scale factor?

Thanks in advance for your help.

Strange. For me AvailableTop is 25 on macOS Sequoia and that is the high of the menubar here.

Of course you need to put the window further down as you need room for the title bar, too.

You do not need to calculate scale factor into position. You do not need to calculate for Title Bar height either.

Remember that Window.Top and the Window.Bounds.Top are different things.

Thanks for replying, indeed, I didn’t know the bounds property of a window.

I’m gonna try to fix my issue with this property.