Problems with Multiple Monitors

Gabe J gwjapp at gmail.com
Thu May 6 12:56:37 EDT 2021


Also, the point of my previous email is that stack "revMenubar" seems to
move around sometimes when you change multi-monitor configurations on Mac,
which sets up the conditions for this issue.

Gabe

On Thu, May 6, 2021 at 11:52 AM Gabe J <gwjapp at gmail.com> wrote:

> I've discovered that LiveCode (at least LC 9.6.1) seems to force the
> reported top of a manually-moved stack to be the bottom of stack
> "revMenubar" + 20, if the stack is overlapping revMenubar (even if
> revMenubar is not visible), even if the visual top of the stack is higher
> than that. All mouse clicks will be vertically off by whatever offset there
> is between the bottom of stack "revMenubar" + 20 and the visual top of the
> overlapping, manually-moved stack.
>
> For example, if you were to run this:
>
>     set the bottom of stack "revMenubar" to 200
>
> And then move a stack so that it overlaps revMenubar (manually moving the
> stack seems to possibly be a necessary step), if you run "put the top of
> ..." for that overlapping stack, it will be 220, even if it is visually
> above 220, and mouse clicks in the stack will also be vertically off.
>
> If I set the position of stack "revMenubar" so that its bottom is above
> the highest working screenRect's top + 20 (or whatever the height of the
> window's title bars are?), this issue can be avoided. I have made a handler
> which does this when the screenRects change.
>
> I ran into another potential bug where the bottom of a stack couldn't be
> positioned in a certain area without it also reporting the top/mouseclicks
> incorrectly on a second screen above my laptop's screen, but I haven't
> figured out why that is, yet.
>
> Gabe
>
>
> On Thu, May 6, 2021 at 9:58 AM Roger Guay via use-livecode <
> use-livecode at lists.runrev.com> wrote:
>
>> Hi Fred et al,
>>
>> I use the following script to switch the monitor I wish to use for the
>> revmenubar and revTools and then position pallets like my own rTools and
>> tmAlign3. It is working quite nicely for me with my external monitor
>> positioned above my MBP and “Displays have separate spaces” unchecked.
>>
>>
>> on mouseUp
>>
>> put the screenrects into tsr
>>
>>         if the number of lines of tsr = 2 then
>>
>>                 if the left of stack revmenubar = item 1 of tsr then
>>
>>                         set the left of stack revmenubar to item 1 of
>> line 2 of tsr
>>
>>                         set the top of stack revmenubar to item 2 of line
>> 2 of tsr + 25
>>
>>                 else
>>
>>                         set the left of stack revmenubar to item 1 of tsr
>>
>>                         set the top of stack revmenubar to item 2 of tsr
>> + 25
>>
>>                 end if
>>
>>         end if
>>
>>         positionPalletes
>>
>>         pass mouseUp
>>
>> end mouseUp
>>
>>
>> on positionPalletes
>>
>>         set the top of stack revtools to the bottom of stack revMenuBar +
>> 20
>>
>>         set the left of stack revTools to the left of stack revmenubar
>>
>>         set the top of stack rtools to the bottom of stack revMenuBar + 20
>>
>>         set the left of stack rTools to the right of stack revtools
>>
>>         set the left of stack tmAlign3 to the right of stack revMenubar
>>
>>         set the top of stack tmAlign3 to the top of stack revMenubar
>>
>> end positionPalletes
>>
>>
>>
>> HTH,
>> Roger
>>
>>
>>
>> > On May 6, 2021, at 1:41 AM, Fred Moyer via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>> >
>> >
>> >
>> >> On May 4, 2021, at 5:32 PM, Fred Moyer <fmoyer at aol.com> wrote:
>> >>
>> >> Anyone having problems with multiple monitors and LC? I’m running
>> 9.6.1 - Mac. I have a feeling LC is confused because I like to connect and
>> disconnect monitors from my MacBook Pro. (Even the MacOS sometimes gets
>> confused.) But now LC is doing crazy things — even when no external
>> monitors are connected. I’ll move the mouse to the top of a stack window,
>> and ask for the Mouseloc and it will return something like "100,-60”. If I
>> click a button in the middle of the stack, the click will register in an
>> object the 60 pixels above that. It’s not always 60 — the wrongness changed
>> as I move the stack around. Other times it works fine. I can’t find a
>> pattern to set it off.
>> >>
>> >> Any suggestions?
>> >> Thanks.
>> >>
>> >> Fred
>> >>
>> >>
>> >
>> > Thanks everyone for the interesting replies. I learned a lot
>> (“desktopChanged", "the working screenrects,” difference between "the
>> screenrect" and "the screenrects," etc.) I have a hunch, though, my problem
>> may relate to stack RevMenubar and some accommodation the IDE makes for
>> “the mouseV” depending on whether RevMenubar is showing or whether you have
>> your own menubar or whether that screen has a menubar in it  —  I dunno.
>> I’ve never understood how this works. I notice sometimes, though, when I
>> turn on Toolbar Text, it shows up about 100 or 200 pixels down.
>> >
>> > Fred
>> > _______________________________________________
>> > 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
>>
>> _______________________________________________
>> 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
>>
>



More information about the use-livecode mailing list