Problems with Multiple Monitors
ambassador at fourthworld.com
Wed May 5 11:42:47 EDT 2021
Thanks, Paul, and the others who chimed in.
I'm familiar with the documented features for screen metrics, just
trying to determine if the rect of the main screen no longer being the
reference point for metrics is a change/bug I need to be concerned about?
And this got me thinking about screenLoc: if the main screen isn't the
reference point, then is the screenLoc adjusted for the non-0,0 corner
or is it based on the sum boundary of all connected monitors?
And is any of this platform-specific?
Or different from how it's been since the plural screenRects was introduced?
Fourth World Systems
Paul Dupuis wrote:
> On 5/4/2021 8:20 PM, Richard Gaskin via use-livecode wrote:
>> Paul Dupuis wrote:
>>> With multiple monitor, zero vertical is the top of the top most
>>> monitor - regardless of whether it is the primary monitor or not.
>> If the screenRect is no longer based on the main monitor, what is the
>> In a multi-monitor setup, with metrics like that how can one be
>> expected to center a window?
> screenRect still returns the rect of the main monitor
> the first line of the screenRects is still the rect of the main or
> primary monitor (the one with the menubar/taskbar)
> however, you can not count on its left,top of the primary monitor being
> 0,0 in a multiple monitor configuration. It may be or it may not be
> depending of where the second (or more) monitors are in relation to the
> primary one. Took me a while to figure this one out based on a
> customer's reported symptoms!
> Also, if you think you may have customers with multiple monitors, the on
> desktopChanged message is your friend. I ran into a customer who would
> often leave HyperRESEARCH running, minimized or hidden, and then remove
> a external monitor from their laptop to go. LiveCode still thinks the
> monitor is attached and when they placed HR windows on that external
> monitor, those windows were no visible or accessible (unless they quit
> and restarted HR). Now I have a desktopChanged handler that gets the
> screenRects and checks to see if every open window is inside a current
> screenRect and moves the windows if needed.
More information about the use-livecode