Mac Multiple Monitor Menubar Management
Mike Kerner
MikeKerner at roadrunner.com
Sun Jan 23 22:39:37 EST 2022
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.
More information about the use-livecode
mailing list