Mac Multiple Monitor Menubar Management
Phil Davis
phil at pdslabs.net
Mon Jan 24 01:21:40 EST 2022
Hi Mike,
Would this give you what you need?
function menubarHeight
return item 2 of the working screenRect
end menubarHeight
Phil Davis
On 1/23/22 7:39 PM, Mike Kerner via use-livecode wrote:
> Other than using windowBoundingRect, is there any way to compute the
> menubar height? The 2021 MBP's have changed the height of the menubar to
> accommodate the notch.
> Generally it's 42 pixels on the new MBP, except when it's something else,
> especially on secondary monitors (e.g. I've seen it at 50 px in one case).
> I want to constrain the movement of a window to keep the user from dragging
> it under the menubar. The code I have works great, until you add monitor 2.
> screenRects (plural) tells you what the rect is for the second window, but
> it doesn't take the menubar into account. I could just assume it's the same
> height as the menubar on monitor 1, but that assumes that the menubar is
> present on monitor 2, as well.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
--
Phil Davis
503-307-4363
More information about the use-livecode
mailing list