It is currently March 29th, 2024, 2:29 pm

Desktopworkarea (refresh help)

Get help with installing and using Rainmeter.
viperveteran
Posts: 6
Joined: May 5th, 2014, 11:20 am

Desktopworkarea (refresh help)

Post by viperveteran »

Hi I need some help with my desktopworkarea setting. I have successfully edited the rainmeter.ini to set the work area for my monitors, however periodically the areas will become unreserved until I refresh all, after which all the reservations will be applied again.

I was wondering whether there is a general fix to make rainmeter's reservation persistent or if there is a way to refresh either periodically or when rainmeter detects that the spaces have become unreserved.

Any help will be appreciated, thanks.
User avatar
Yincognito
Rainmeter Sage
Posts: 7030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Desktopworkarea (refresh help)

Post by Yincognito »

viperveteran wrote: October 16th, 2020, 10:02 am Hi I need some help with my desktopworkarea setting. I have successfully edited the rainmeter.ini to set the work area for my monitors, however periodically the areas will become unreserved until I refresh all, after which all the reservations will be applied again.

I was wondering whether there is a general fix to make rainmeter's reservation persistent or if there is a way to refresh either periodically or when rainmeter detects that the spaces have become unreserved.

Any help will be appreciated, thanks.
I don't think there is a fix for this, read the note in the manual about it. In the past, I wanted to use the same feature , and while I loved it and it worked perfectly, I was taken aback by it resetting in the mentioned instances, so eventually gave up on it, choosing to make my skins smaller / minimalist and trying to make them fit a limited area.

Other folks here simply don't maximize their windows to simulate this effect, but as you can imagine, that's not exactly a comfortable or automated solution...

P.S. Refreshing the settings periodically is probably doable by using a !LoadLayout or a !RefreshApp bang (see the Bangs section in the manual), but this would unfortunately refresh everything else as well, not just that particular setting. Detecting when the setting was reset is much more difficult, because Rainmeter doesn't keep track of these type of changes, that require constant (and very fast, thus inefficient, for a real-time effect) monitoring.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Desktopworkarea (refresh help)

Post by jsmorley »

I agree with Yincognito on this.

Really, the entire concept of DesktopWorkArea is a function of the Windows operating system, and is something that has a very narrow utility for the OS, designed to keep maximized windows from interfering with the taskbar, and is completely under the control of the OS.

I really think it is not worth the hassle and frustration to try and use this in Rainmeter. I know, Rainmeter has some functionality in it to work with this, but in truth it probably never should have. Windows does not acknowledge or respect any changes Rainmeter makes. Fighting with Windows about it is a potentially expensive and ultimately frustrating exercise.

I'm one of those who just relies on the fact that application windows almost always "remember" the size and position they are set at, and just keep my browser, text editor, and all other applications I use on a regular basis set to be out of the way of my Rainmeter skins on the desktop. I just never maximize anything. This certainly won't be for everyone, but it does work pretty well for me. My primary monitor size and resolution means I have plenty of room to have my collection of Rainmeter skins more or less as a sidebar on the right and my Rainmeter launcher/dock on the bottom, and still have plenty of room in the middle to work just fine in my applications. Your mileage may vary...


1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Desktopworkarea (refresh help)

Post by jsmorley »

It's possible that a very lightweight Rainmeter plugin could be written to simply check for the current DesktopWorkArea say once a second, and react to a change in it by returning something like "1" if it has changed since the last update, or "-1" if it has not. Then you could have a measure that uses that value to force a !RefreshApp if, and only if, Windows resets it to what it wants.

The question then becomes, how often does Windows really reset the dimensions. It certainly does if you change the size or location of the taskbar, but really, how often do you do that... I suspect might also be reset if you run full-screen games, perhaps even if you toggle your browser "full-screen" or run an application like Netflix when playing videos and such, and that is a bit more problematic. I'd be a bit fearful of getting into a real squabble with Windows over this, where you are trying to do something "full-screen" and Rainmeter and Windows get into a potentially endless fistfight about the DesktopWorkArea.
User avatar
Yincognito
Rainmeter Sage
Posts: 7030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Desktopworkarea (refresh help)

Post by Yincognito »

jsmorley wrote: October 16th, 2020, 1:28 pmI agree with Yincognito on this.
I don't think your browser likes the fact that you agree with me this time - it just keeps marking my username for a spelling correction... :sly:
jsmorley wrote: October 16th, 2020, 1:43 pmIt's possible that a very lightweight Rainmeter plugin could be written to simply check for the current DesktopWorkArea say once a second, and react to a change in it by returning something like "1" if it has changed since the last update, or "-1" if it has not. Then you could have a measure that uses that value to force a !RefreshApp if, and only if, Windows resets it to what it wants.
That would be nice to have, if the potential plugin would be able to be updated as desired (i.e. not be limited to just 1 second), and of course, if it would be possible somehow to set back the desktop work area without having to refresh the entire Rainmeter environment, say by using a !Redraw or something instead. That's probably too much to ask though...
jsmorley wrote: October 16th, 2020, 1:43 pm The question then becomes, how often does Windows really reset the dimensions. It certainly does if you change the size or location of the taskbar, but really, how often do you do that... I suspect might also be reset if you run full-screen games, perhaps even if you toggle your browser "full-screen" or run an application like Netflix when playing videos and such, and that is a bit more problematic. I'd be a bit fearful of getting into a real squabble with Windows over this, where you are trying to do something "full-screen" and Rainmeter and Windows get into a potentially endless fistfight about the DesktopWorkArea.
Yes. It resets when running full screen games and other instances as well, like you suspected. If it only reset itself when moving the taskbar or changing the resolution manually, that wouldn't have stopped me from using the feature, as, like you said, that probably happens very rarely (if it does, that is, since one does these things right after installing Windows and then never change them anymore).

Regarding full-screen and fistfighting about the desktop work area, I'm not sure it has to be that way, at least from my perspective. When something is full screen, I generally don't want to set the desktop work area to less than the size of the screen and just prefer that Rainmeter skins are displayed "over" the screen normally, like the current behavior when it comes to a full-screen video player (which doesn't reset the area, by the way - at least not the player I'm using).

P.S. Just tried, loading a layout would NOT set back the desired desktop work area (although the settings are stored in the layout's Rainmeter.ini, after all), only a refresh all will do it. And yeah, coming back from playing a full-screen game will reset the desktop work area, just as I remembered from when I last tried the feature years ago. Basically, if one could make full screen applications (like games, in this case) to react the same way the video players do, that would pretty much solve the issue. But then, maybe the video player doesn't really do an actual full screen, and just overlays the image over the entire screen...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Desktopworkarea (refresh help)

Post by jsmorley »

Yincognito wrote: October 16th, 2020, 3:44 pm Regarding full-screen and fistfighting about the desktop work area, I'm not sure it has to be that way, at least from my perspective. When something is full screen, I generally don't want to set the desktop work area to less than the size of the screen and just prefer that Rainmeter skins are displayed "over" the screen normally, like the current behavior when it comes to a full-screen video player (which doesn't reset the area, by the way - at least not the player I'm using).
My fear is that you have Rainmeter running, containing 1) A setting for DesktopWorkArea in Rainmeter.ini, and 2) a skin using this fictional plugin to detect a change and force a !RefreshApp. When you run a full-screen game or anything else that causes Windows to change the DesktopWorkArea, the skin will react to that and in effect force it to change back. I'm not sure how Windows will react to that. It might only make the change once, and will be fine with Rainmeter changing it behind its back, or it might detect the change Rainmeter made, and say "I don't think so Tim!". I guess it also matters whether or not the change to the DesktopWorkArea made by the full-screen whatever is actually "important" to the functionality. In any case, any "real-time" fighting about it in my view has the potential for an endless loop.

Hard to really test and evaluate without the plugin, which at this time doesn't exist.
User avatar
Yincognito
Rainmeter Sage
Posts: 7030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Desktopworkarea (refresh help)

Post by Yincognito »

jsmorley wrote: October 16th, 2020, 3:52 pm My fear is that you have Rainmeter running, containing 1) A setting for DesktopWorkArea in Rainmeter.ini, and 2) a skin using this fictional plugin to detect a change and force a !RefreshApp. When you run a full-screen game or anything else that causes Windows to change the DesktopWorkArea, the skin will react to that and in effect force it to change back. I'm not sure how Windows will react to that. It might only make the change once, and will be fine with Rainmeter changing it behind its back, or it might detect the change Rainmeter made, and say "I don't think so Tim!". I guess it also matters whether or not the change to the DesktopWorkArea made by the full-screen whatever is actually "important" to the functionality. In any case, any "real-time" fighting about it in my view has the potential for an endless loop.

Hard to really test and evaluate without the plugin, which at this time doesn't exist.
Yeah. Personally, I believe that changing the desktop work area in a full screen game won't have any effect whatsoever, so the concern about fistfighting or an endless loop might be pointless, after all. If the setting is what I think it is, then it will only act on the "work area" while in the screen's desktop mode, and not in a Direct 3D application, which runs "outside" of the desktop mode, so to speak (see here).

The difference between these modes is very easy to notice when testing a screen capture software. Only a few of them have (or used to have) the ability to "detect" in which mode they needed to capture (and possibly, how to "merge" the desktop and the D3D video parts), and just stopped the recording entirely when the user switched to a different mode (although, in theory, the command to record was still active).

P.S. That's probably the reason why the work area is reset by running D3D applications in the first place, IMHO.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22628
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:13 pm Yeah. Personally, I believe that changing the desktop work area in a full screen game won't have any effect whatsoever, so the concern about fistfighting or an endless loop might be pointless, after all. If the setting is what I think it is, then it will only act on the "work area" while in the screen's desktop mode, and not in a Direct 3D application, which runs "outside" of the desktop mode, so to speak (see here).

The difference between these modes is very easy to notice when testing a screen capture software. Only a few of them have (or used to have) the ability to "detect" in which mode they needed to capture (and possibly, how to "merge" the desktop and the D3D video parts), and just stopped the recording entirely when the user switched to a different mode (although, in theory, the command to record was still active).

P.S. That's probably the reason why the work area is reset by running D3D applications in the first place, IMHO.

It's certainly possible that an actual D3D directX full screen game doesn't cause Windows to change the DesktopWorkArea. I don't really have any idea, nor any easy way to test that. The point is the same though, if a "desktop" application like your browser or a Netflix application or whatever DOES cause the change, and I just don't know how Windows will react to something outside of that application changing it "back", once the application is running.

I suppose it is possible that the way it works is that Windows doesn't know or care what changes the DesktopWorkArea at any given point, but only resets it to the default (screen - taskbar) when it detects that something that is running "full-screen" ends, and "control" is returned to the desktop. I'm just not sure what the underlying behavior is based on.
User avatar
Yincognito
Rainmeter Sage
Posts: 7030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Desktopworkarea (refresh help)

Post by Yincognito »

jsmorley wrote: October 16th, 2020, 4:21 pm It's certainly possible that an actual D3D directX full screen game doesn't cause Windows to change the DesktopWorkArea. I don't really have any idea, nor any easy way to test that. The point is the same though, if a "desktop" application like your browser or a Netflix application or whatever DOES cause the change, and I just don't know how Windows will react to something outside of that application changing it "back", once the application is running.
Well, actually there is no need to change it back while the said application is running, at least from my perspective. It's enough to "re-enforce" (or remember to set it back) it once Windows comes back from D3D to the desktop mode. This is closely connected to how an hypothetically "automatic" implementation of the Game Mode setting in Rainmeter (which is currently done on a manual basis) would work. Once - and if - you manage to implement an automatic switch of the Game Mode setting, applying the approach to the work area would be trivial, since they both would be based on detecting the mode change (from desktop to D3D and / or viceversa).

I'm not saying that you should do it, I'm just saying that if you ever consider doing it or tackle the thing in any way (in Rainmeter itelf or in a plugin), this would be the way to make it work.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Desktopworkarea (refresh help)

Post by Yincognito »

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.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth