It is currently April 27th, 2024, 6:07 am

Keep on screen?

Report bugs with the Rainmeter application and suggest features.
User avatar
Kolano
Posts: 24
Joined: October 23rd, 2015, 11:54 pm

Re: Keep on screen?

Post by Kolano »

Yincognito wrote: January 21st, 2024, 5:44 am One quick question though: are your skins placed in the right positions if you restart Rainmeter? I mean, no dragging with the mouse to reposition or loading any layout after they get messed up, just exiting Rainmeter and executing it again. Assuming, of course, that they were set in the correct positions before the jumping off place occurs.
Yes, things remain in place across a Rainmeter restart, but power cycling monitors causes them to shift around wildly.

Thanks for the assistance with how to monitor the setups of each screen, hopefully that will provide some insight. Though it will be annoying if the assignments of monitors to IDs shifts due to their power on cycle once returned to their former powered state, that complicates even basic handling of multiple monitors significantly; none the less trying to account for arbitrary combinations.
___________________________________________________
Pre-Monitor Restart:
Work Area #1: 0, 0 ,2560, 1392
Work Area #2: 2560, -1118, 1080, 1920
Work Area #3: -2560, -14. 2560, 1444
Post-Monitor Restart:
Work Area #1: -2560, -14. 2560, 1444
Work Area #2: 0, 0 ,2560, 1392
Work Area #3: 2560, -1118, 1080, 1920
So, yeah, issue is that the work/screen areas change numeric assignment across monitor restarts, and aren't correlated with the numeric assignments Windows uses as I had presumed. There also seems to be some issues caused by the scaling settings, though I need to review Yincognito's config more closely, as it only outputs a single Scale for the last of my 5 displays (presumably my three screens and each eye of my VR headset).

This feels very irksome to deal with, a means to reference monitors consistently would be helpful.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Keep on screen?

Post by Yincognito »

Kolano wrote: January 21st, 2024, 6:50 am Yes, things remain in place across a Rainmeter restart, but power cycling monitors causes them to shift around wildly.

Thanks for the assistance with how to monitor the setups of each screen, hopefully that will provide some insight. Though it will be annoying if the assignments of monitors to IDs shifts due to their power on cycle once returned to their former powered state, that complicates even basic handling of multiple monitors significantly; none the less trying to account for arbitrary combinations.
___________________________________________________
Pre-Monitor Restart:


Post-Monitor Restart:


So, yeah, issue is that the work/screen areas change numeric assignment across monitor restarts, and aren't correlated with the numeric assignments Windows uses as I had presumed. There also seems to be some issues caused by the scaling settings, though I need to review Yincognito's config more closely, as it only outputs a single Scale for the last of my 5 displays (presumably my three screens and each eye of my VR headset).

This feels very irksome to deal with, a means to reference monitors consistently would be helpful.
Thanks for the feedback!

Yeah, that's what I was talking about - monitoring those values at least offers a clue on where the problem lies, and, in the best scenario, "could" provide a way to properly react to this in the skins, via some skin bangs. The worst scenario would be to need a Rainmeter restart when these things change, in order to set things back accordingly (which is why I asked if it solves things) - this seems similar to how other options depending on the Rainmeter initialization process work, like DesktopWorkArea for example. If so, although not quite desirable or user friendly, such a restart can be done automatically by running a simple batch file (I wrote one for my DesktopWorkArea case, if you need it and Rainmeter restarting is helpful in that regard).

Regarding scaling, you would need to adjust those PowerShell commands used to query the related registry keys accordingly (if they do resemble the structure that I had, obviously, something you can see by running regedit.exe). Unfortunately, like I explained in the other thread, the scaling values in such a case are system dependent and relate to what you have in the scaling settings combo box in Windows.

Keep us posted on what else you notice or any progress or difficulty in that regard - who knows, maybe there is a feasible workaround to this and we could help, if the standard solutions like simple skin settings configuration aren't enough. :???:

EDIT: I was thinking, if your monitors are arbitrarily swapped positionally depending on the order in which they are turned on, you might want to use "absolute" coordinates to position your skins via bangs like !Move or !SetWindowPosition in the skin's OnRefreshAction from its [Rainmeter] section, on whatever monitor that contains that absolute position (assuming that monitor spaces don't overlap, of course). For example, if your actual visual space made up by your monitors is, say, 5000 × 2000 (with the top left at around -2500,-1000 as per your monitor coordinates posted values above), and you want your skin to be placed towards the bottom right on that (e.g. X=4300, Y=1200 on that space), then forget about placing it on a fixed monitor index via @N, and just compare to find out which @N monitor such X,Y would correspond and place it on that @N. In your case, it would be the monitor with the positive coordinates, since the other two are to the left and top of it in your arrangement (with partially negative coordinates). This would place the skin on the 1st monitor for your 1st values, and on your 2nd monitor for your 2nd values above - if you get the idea. So, besides potential scaling or anchor alignment influences, it would be just some "simple" math like checking between which absolute coordinates is your X,Y point in terms of monitor coordinates, if that makes sense.
Last edited by Yincognito on January 21st, 2024, 6:34 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
SilverAzide
Rainmeter Sage
Posts: 2611
Joined: March 23rd, 2015, 5:26 pm

Re: Keep on screen?

Post by SilverAzide »

Kolano wrote: January 21st, 2024, 6:50 am So, yeah, issue is that the work/screen areas change numeric assignment across monitor restarts, and aren't correlated with the numeric assignments Windows uses as I had presumed. There also seems to be some issues caused by the scaling settings, though I need to review Yincognito's config more closely, as it only outputs a single Scale for the last of my 5 displays (presumably my three screens and each eye of my VR headset).

This feels very irksome to deal with, a means to reference monitors consistently would be helpful.
This is the info I was wondering about. So powering monitors on and off causes the indexes to shift around. To resolve your issue, there needs to be a way to identify a monitor's index with a specific device, so you could then create skins that key off the device identifier itself instead of some random index value.

Sounds like what you need is either an enhancement of the SysInfo measure to expose this data, or write your own plugin that wraps the Win32 EnumDisplayDevices API and retrieves device info so that you can create skins that move themselves to specific displays depending on device availability.
Gadgets Wiki GitHub More Gadgets...
User avatar
Kolano
Posts: 24
Joined: October 23rd, 2015, 11:54 pm

Re: Keep on screen?

Post by Kolano »

Yeah, I was able to find this post all the way back from 2009 that covers the various issues resulting in this situation...
https://forum.rainmeter.net/viewtopic.php?t=2130&start=10#p15422
...kind of a shame an issue pointed out way back then is still ongoing though.

For now, I seem to be seeing somewhat better results by keeping things positioned on the virtual screen rather than trying to assign them to specific monitors. That at least seems to keep them positioned appropriately once all three displays are back on, though they still drift all over when dealing with fewer displays powered on or when display resolutions change, and sometimes fail to account for display scaling appropriately.

I had seen various posts here indicating assigning to specific monitors would account for those issues, but good to now have an understanding why that's not the case. Having some way to more consistently assign things to particular displays without the need for excessive scripting would definitely be desirable though.
User avatar
Kolano
Posts: 24
Joined: October 23rd, 2015, 11:54 pm

Re: Keep on screen?

Post by Kolano »

And thanks a bunch Yincognito and SilverAzide for the feedback here. Was definitely quite helpful.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Keep on screen?

Post by Yincognito »

Kolano wrote: January 21st, 2024, 8:08 pm Yeah, I was able to find this post all the way back from 2009 that covers the various issues resulting in this situation...
https://forum.rainmeter.net/viewtopic.php?t=2130&start=10#p15422
...kind of a shame an issue pointed out way back then is still ongoing though.

For now, I seem to be seeing somewhat better results by keeping things positioned on the virtual screen rather than trying to assign them to specific monitors. That at least seems to keep them positioned appropriately once all three displays are back on, though they still drift all over when dealing with fewer displays powered on or when display resolutions change, and sometimes fail to account for display scaling appropriately.

I had seen various posts here indicating assigning to specific monitors would account for those issues, but good to now have an understanding why that's not the case. Having some way to more consistently assign things to particular displays without the need for excessive scripting would definitely be desirable though.
Kolano wrote: January 21st, 2024, 8:14 pm And thanks a bunch Yincognito and SilverAzide for the feedback here. Was definitely quite helpful.
You're welcome from my part - sorry we couldn't help even more...

A somewhat similar attempt to using the virtual screen (like I was describing in the edit of my previous post):

Code: Select all

[Variables]
AbsoluteX=500
AbsoluteY=200

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,255,0,255

---Measures---

[SkinPosition]
Measure=Calc
IfCondition=((#AbsoluteX#>=(#SCREENAREAX@1#)) && (#AbsoluteX#<=(#SCREENAREAX@1#+#SCREENAREAWIDTH@1#)) && (#AbsoluteY#>=(#SCREENAREAY@1#)) && (#AbsoluteY#<=(#SCREENAREAY@1#+#SCREENAREAHEIGHT@1#)))
IfTrueAction=[!SetWindowPosition "(#AbsoluteX#-#SCREENAREAX@1#)@1" "(#AbsoluteY#-#SCREENAREAY@1#)@1" "0%" "0%"][!Log "The skin was placed on monitor 1"]
IfCondition2=((#AbsoluteX#>=(#SCREENAREAX@2#)) && (#AbsoluteX#<=(#SCREENAREAX@2#+#SCREENAREAWIDTH@2#)) && (#AbsoluteY#>=(#SCREENAREAY@2#)) && (#AbsoluteY#<=(#SCREENAREAY@2#+#SCREENAREAHEIGHT@2#)))
IfTrueAction2=[!SetWindowPosition "(#AbsoluteX#-#SCREENAREAX@2#)@2" "(#AbsoluteY#-#SCREENAREAY@2#)@2" "0%" "0%"][!Log "The skin was placed on monitor 2"]
IfCondition3=((#AbsoluteX#>=(#SCREENAREAX@3#)) && (#AbsoluteX#<=(#SCREENAREAX@3#+#SCREENAREAWIDTH@3#)) && (#AbsoluteY#>=(#SCREENAREAY@3#)) && (#AbsoluteY#<=(#SCREENAREAY@3#+#SCREENAREAHEIGHT@3#)))
IfTrueAction3=[!SetWindowPosition "(#AbsoluteX#-#SCREENAREAX@3#)@3" "(#AbsoluteY#-#SCREENAREAY@3#)@3" "0%" "0%"][!Log "The skin was placed on monitor 3"]
DynamicVariables=1

---Meters---

[Infos]
Meter=String
Y=0R
FontFace=Consolas
FontSize=10
AntiAlias=1
Text=Screen Area #1: #SCREENAREAX@1#, #SCREENAREAY@1#, #SCREENAREAWIDTH@1#, #SCREENAREAHEIGHT@1##CRLF#Screen Area #2: #SCREENAREAX@2#, #SCREENAREAY@2#, #SCREENAREAWIDTH@2#, #SCREENAREAHEIGHT@2##CRLF#Screen Area #3: #SCREENAREAX@3#, #SCREENAREAY@3#, #SCREENAREAWIDTH@3#, #SCREENAREAHEIGHT@3##CRLF#Absolute Coords: #AbsoluteX#, #AbsoluteY##CRLF#Current Config: #CURRENTCONFIGX#, #CURRENTCONFIGY#, #CURRENTCONFIGWIDTH#, #CURRENTCONFIGHEIGHT#
DynamicVariables=1
This should keep the skin on the defined "absolute" coordinates by identifying which @N monitor those coordinates belong to. If you want the check to happen every time the measure is updated, add an IfConditionMode=1 to the measure (that will not allow you to drag the skin to a different position in the current form of the code though, even though things can be adjusted if needed). This is just a test skin, by no means fully polished, but it would be interesting to find out if the approach works in keeping the defined position of the skin stable when you switch monitors on and off. You can use whatever "absolute" coordinates you want, negative or positive according to your preferences.

P.S. I didn't covered the possibility of the absolute / "virtual" coordinates not matching the coordinates of any screen (e.g. if you power off the monitor where the skin should be placed), so that should be taken into account when testing.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Keep on screen?

Post by eclectic-tech »

Kolano wrote: January 21st, 2024, 8:08 pm Yeah, I was able to find this post all the way back from 2009 that covers the various issues resulting in this situation...
https://forum.rainmeter.net/viewtopic.php?t=2130&start=10#p15422
...kind of a shame an issue pointed out way back then is still ongoing though.

For now, I seem to be seeing somewhat better results by keeping things positioned on the virtual screen rather than trying to assign them to specific monitors. That at least seems to keep them positioned appropriately once all three displays are back on, though they still drift all over when dealing with fewer displays powered on or when display resolutions change, and sometimes fail to account for display scaling appropriately.

I had seen various posts here indicating assigning to specific monitors would account for those issues, but good to now have an understanding why that's not the case. Having some way to more consistently assign things to particular displays without the need for excessive scripting would definitely be desirable though.
There are some newer posts that have discussions concerning multiple monitor setups:
https://forum.rainmeter.net/viewtopic.php?t=21188#p112930
and this follow up post:
https://forum.rainmeter.net/viewtopic.php?f=99&t=21545#p114355