Multiple monitors &

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Multiple monitors &

Post by richmond62 » Wed Apr 22, 2020 8:15 am

I have several computers that use more than one monitor [Mac and Linux], including a 2018 Mac Mini with 3, and started wondering . . .

I shall use the Mac Mini as my example machine.

Let's imagine I have a "monster stack" that is 4000 pixels wide and extends across my 3 monitors (my widest is 1920 pixels) . . .

. . . It's a fairly pedestrian game where 'sprites' are moved around with the arrow keys on my keyboard . . .

Here's a picture of my monitor layout when I turn on my machine:
-
Screenshot 2020-04-22 at 10.09.00.png
Screenshot 2020-04-22 at 10.09.00.png (7.37 KiB) Viewed 7117 times
-
However, I have designed my "monster stack" on the premise that my monitors will be arranged like this:
-
Screenshot 2020-04-22 at 10.11.26.png
Screenshot 2020-04-22 at 10.11.26.png (7.38 KiB) Viewed 7117 times
-

1. Is there anyway LiveCode can detect the screen arrangement? so, if so, it can flash a signal to the end-user to rearrange their monitor layout.

"In a perfect world" my stack/standalone should be placed like this when it starts up:
-
Screenshot 2020-04-22 at 10.14.50.png
Screenshot 2020-04-22 at 10.14.50.png (7.37 KiB) Viewed 7117 times

AndyP
Posts: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Re: Multiple monitors &

Post by AndyP » Wed Apr 22, 2020 9:47 am

Try this

put the working screenrects

This will give you a list of the dimensions for each screen attached.

From the dictionary.
In its plural form (screenRects) this function returns a list containing the virtual co-ordinates of all the screens currently attached to the system. The first line is always that of the primary display, and the order of the rest are in an OS-specific order.
Hope this helps.
Andy .... LC CLASSIC ROCKS!

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Multiple monitors &

Post by richmond62 » Wed Apr 22, 2020 10:33 am

the order of the rest are in an OS-specific order
I suspect it is the lockdown, but I keep hearing voices . . . most saying either extremely rude or blasphemous things . . .

. . . for instance, an extremely heavy, coarse voice just breathed "truly cross-platform" into my gully lug.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Dual monitor fudge.

Post by richmond62 » Fri May 15, 2020 11:56 am

displayProblem.png
-
On my 2006 iMac running MacOS 10.7.5 if I drag a window between the monitors I can see half of the window in each monitor.

Doing that on my Mac mini running MacOS 10.15.5 doesn't work like that (see silly picture above).

Does anyone know of a way to get the mac mini to behave like the earlier machine and system?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Dual monitor fudge.

Post by richmond62 » Fri May 15, 2020 1:41 pm

Screenshot 2020-05-15 at 15.34.59.png
-
Uncheck the 'separate spaces' box.

1. Why does Apple shove things up one's nose and not document how to "regress" if one wants to?

2. As our house is in the clutches of the builders where are the Guinness Book of Records people going to stay
when they come to write down the details of my world record for replying to my own posts? 8)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Multiple monitors &

Post by richmond62 » Fri May 15, 2020 1:52 pm

Now I have just discovered that MacOS 10.15.X behaves oddly with dual monitors:
-
displayProblem.png
-
Which is going to be a big pain-in-the-bum for any would-be developer of a multi-display-spanning-standalone . . .

You can turn off this feature via the 'Mission Control' panel [what a stupid and non-intuitive name and place to look]
in the system preferences . . . but as this is poorly documented it is unlikely that most of a targetted demographic will have done that.

So . . . the next Q is how one can detect if an end-user has "Displays have separate Spaces" checked or not.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Multiple monitors &

Post by FourthWorld » Fri May 15, 2020 4:31 pm

Should I merge the duplicate thread posted to the "Off Topic" forum here?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Multiple monitors &

Post by richmond62 » Fri May 15, 2020 7:58 pm

Seems reasonable. 8)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Multiple monitors &

Post by FourthWorld » Fri May 15, 2020 8:33 pm

Thanks. Done.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Multiple monitors &

Post by richmond62 » Fri May 15, 2020 9:44 pm

Thank you. :)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Multiple monitors &

Post by richmond62 » Sat May 16, 2020 11:36 am

OS.jpg
-
Is anyone aware of this phenomenon of running desktops on multiple monitors in separate spaces
is used in operating systems other thean MacOS?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Multiple monitors &

Post by mwieder » Sat May 16, 2020 3:22 pm

I have my linux development environment spread across three monitors, and I use the working screenrects to get the dimensions and then work out from the stack locations which monitor they're on. This mostly works, although it would certainly be nice if the screenloc function could return more than just the main screen. Screenloc(2) would be a very useful enhancement.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Multiple monitors &

Post by richmond62 » Sat May 16, 2020 9:00 pm

Screenshot 2020-05-16 at 22.58.39.png
-
As you will see, this is done in a very primitive way using 2 list fields (Klaus has been getting on my case
about over use of fields since about 2002); mainly because I knocked it together just now in about 15 minutes.

This does not mean the general principle holds and can be re-written in a more efficient fashion.

All the Best. 8)
Attachments
sLox.livecode.zip
Here's the stack.
(1.12 KiB) Downloaded 251 times

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Multiple monitors &

Post by mwieder » Sun May 17, 2020 2:16 am

Thanks - yes I'm aware that I can do this myself, and I do it when necessary.
I just think it would be a nice enhancement if the screenlocs() were an adjunct to the screenrects(), in the same way we now have the screenloc() and the associated screenrect().
And extra credit for screenlocs(2) etc. All I'm saying. :wink:

Post Reply