Mac Multiple Monitor Menubar Management

Mike Kerner MikeKerner at roadrunner.com
Mon Jan 24 09:20:06 EST 2022


Hmm. I tried that before I dove into windowBoundingRect and ran into a
problem, but now it seems to be working, so maybe.
Thanks, Phil.

On Mon, Jan 24, 2022 at 1:53 AM Phil Davis via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Actually 'the working screenRects' returns that info for all screens.
> Maybe that could work for you.
>
> Phil
>
>
> On 1/23/22 10:21 PM, Phil Davis via use-livecode wrote:
> > 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
>
>
> _______________________________________________
> 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
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."


More information about the use-livecode mailing list