Hey there,
I am looking for some advise on the following topic.
I have three monitors and would like to restore windows layout after macbook awakes.
I recorded windows positions but the restore function misplaces them across the monitors.
From what I see in the recorded data, we have these parameters available:
{"size":"{x,x}","windowName":"name”","parentTitle":"<ptitle>","position":"{x,x}","role":"AXWindow"}
How can I specify the screen? What is the reference point for "position" with multiple monitors?
thanks!
The reference point is the top left corner of the main screen (the one with the dock & menubar)
Are you trying to restore on the same display setup where you also recorded the positions?
Thanks Andreas for getting back to me.
Yes, displays stay the same.
Is it correct then, that a negative position value references the external screen left of my main screen?
Add-on question: how does it behave with multiple spaces? Will it always restore to the currently active space?
yes, unfortunately there are no API's to restore windows on non-active spaces ;-(
Correct, negative x would reference the screen left of your main screen
1 Like