It is currently October 19th, 2020, 9:31 pm

Desktopworkarea (refresh help)

Get help with installing and using Rainmeter.
User avatar
jsmorley
Developer
Posts: 21421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Desktopworkarea (refresh help)

Post by jsmorley »

Yincognito wrote: October 16th, 2020, 4:59 pm Just for reference:
- Detecting full-screen Direct3D applications
- Detecting full screen mode in Windows
- a bit unrelated, but may be useful, DirectX Tutorial: Going Fullscreen

Of course, assuming this is relatively easy to do (still not sure, as although at first it seems to be, there might be other things interfering that aren't that obvious), the real question would be how often to do this detection. As for the concern of giving the control to the user, this is irrelevant in the case of a plugin (since the user would choose to use it, after all), and can be easily accomplished by making this "automatic" detection optional in one of Rainmeter's checkboxes or such if it's implemented in the standard Rainmeter package.
I would be inclined to just have a 3rd party plugin that is controlled by the UpdateDivider setting on the measure.
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Desktopworkarea (refresh help)

Post by Yincognito »

jsmorley wrote: October 16th, 2020, 6:07 pm I would be inclined to just have a 3rd party plugin that is controlled by the UpdateDivider setting on the measure.
Yep, that's probably the only way for the user to still be in control of the frequency of updating the detection, as Rainmeter settings have a more general scope and don't deal with such frequencies / update rates.
User avatar
Brian
Developer
Posts: 2067
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Desktopworkarea (refresh help)

Post by Brian »

You could probably monitor the work area monitor variables.
https://docs.rainmeter.net/manual/variables/built-in-variables/#WORKAREAXYWH

-Brian
User avatar
jsmorley
Developer
Posts: 21421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Desktopworkarea (refresh help)

Post by jsmorley »

Brian wrote: October 16th, 2020, 9:43 pm You could probably monitor the work area monitor variables.
https://docs.rainmeter.net/manual/variables/built-in-variables/#WORKAREAXYWH

-Brian
Well damn... I should read the docs.
User avatar
jsmorley
Developer
Posts: 21421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Desktopworkarea (refresh help)

Post by jsmorley »

In chatting with Brian, I'm now convinced that my original point of view, that this entire DesktopWorkArea feature is close to useless and never should have been put in all those years ago is right. It's just not something that Rainmeter can, nor SHOULD gracefully control. It's certainly not something that a "skin author" should be able to impact. That's why it is in Rainmeter.ini.
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Desktopworkarea (refresh help)

Post by Yincognito »

Brian wrote: October 16th, 2020, 9:43 pm You could probably monitor the work area monitor variables.
https://docs.rainmeter.net/manual/variables/built-in-variables/#WORKAREAXYWH

-Brian
That's a brilliant idea... BUT ... this code crashes Rainmeter (I think):

Code: Select all

[MS_Rainmeter_WorkAreaY]
Measure=Calc
IfCondition=(#WORKAREAY#<>24)
IfTrueAction=[!RefreshApp]
DynamicVariables=1
This is updated once every second, and checks if the Y of the workarea is 24, like I set it to in the Rainmeter.ini of the layout I use to "load" the DesktopWorkArea settings (as mentioned before, loading the layout isn't enough, a refresh all is needed). Point is, while it works (I think) without issues in Windows, Rainmeter isn't loaded anymore once I exit the game I use to test the thing.

On the other hand, if I add an UpdateDivider=-1 to the measure and update it on demand, say on mouse over some meter in the skin, it restores the desktop work area settings like it should when the meter is hovered after exiting the game. Of course, there is a catch here too, only when RE-focusing (or RE-bringing into view) the maximized application the setting is visually applied, so the change doesn't, for example, resize my maximized Chrome window if I hover the meter while Chrome is displayed, but it will be in effect the next time I switch to the Chrome window. I guess this behavior is somewhat normal, although it doesn't offer a visual indication that it's changing.
Last edited by Yincognito on October 16th, 2020, 10:36 pm, edited 1 time in total.
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Desktopworkarea (refresh help)

Post by Yincognito »

jsmorley wrote: October 16th, 2020, 10:03 pm In chatting with Brian, I'm now convinced that my original point of view, that this entire DesktopWorkArea feature is close to useless and never should have been put in all those years ago is right. It's just not something that Rainmeter can, nor SHOULD gracefully control. It's certainly not something that a "skin author" should be able to impact. That's why it is in Rainmeter.ini.
I gracefully and wholeheartedly disagree (it didn't take long for us to disagree again, LOL). It's not useless and it's excellent that it exists ... it's just that, while it has a "set" mechanism that works perfectly, it doesn't have a suited "restore" mechanism. That is its only flaw.