Thanks, Phil. Taking another look at it, I was able to get the code to work using working screenRects.
On Mon, Jan 24, 2022 at 9:20 AM Mike Kerner <mikeker...@roadrunner.com> wrote: > 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@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@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@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." > -- 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." _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode