It is currently April 25th, 2024, 8:04 am

Background blur for Windows 10

Report bugs with the Rainmeter application and suggest features.
GordenFreemant
Posts: 9
Joined: March 5th, 2016, 7:53 pm

Background blur for Windows 10

Post by GordenFreemant »

First off, sorry for the topic spam :P

Windows 10 reintroduced a blur API, albeit an undocumented one. I couldn't find anything about it being available in Rainmeter already, so this is me, politely asking for its inclusion in Rainmeter 4.0.
I put a little demo app on GitHub for devs to look at: https://github.com/SamusAranX/W10BlurTest
The code was largely taken from http://withinrafael.com/adding-the-aero-glass-blur-to-your-windows-10-apps/.

By default, the blur accent color is the Aero accent color, but one could use AccentState.ACCENT_ENABLE_TRANSPARENTGRADIENT and the GradientColor thingy in the AccentPolicy struct to use custom colors or simply make the blur transparent. I managed to get custom colors working in one build, but something changed in the next build and I couldn't get it working again, so that feature is sadly not available in the demo. :/
User avatar
Brian
Developer
Posts: 2681
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Background blur for Windows 10

Post by Brian »

We have been aware of this method since Windows 10 came out last year, unfortunately it is limited in its function and cannot be applied like the old Windows 7 blur had. Basically, we can turn it on and off...but we cannot manipulate it like we used to, which is undesirable since older skins could do this for older versions of Windows.

Since this method is undocumented and could be changed at anytime by Microsoft, we have decided to not implement this particular method at this time. This isn't a firm 'no', but more of a 'not at this time' type of answer.

-Brian
Ragingwasabi
Posts: 86
Joined: March 7th, 2015, 2:23 pm

Re: Background blur for Windows 10

Post by Ragingwasabi »

cant u build the functionality into rainmeter and make rainmeter handle the blurring? or is it too complicated? :o
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Background blur for Windows 10

Post by jsmorley »

Ragingwasabi wrote:cant u build the functionality into rainmeter and make rainmeter handle the blurring? or is it too complicated? :o
It is unlikely that we would try to "roll our own" on this. If you think about what is involved, it is not only hugely complicated, (maybe not really even possible) but would likely be a CPU killer for Rainmeter, which we are never happy about.

You in effect would need to somehow remove the skin in question, do a screen-capture of the area behind the skin defined by the size and shape of the desired "blur area(s)", do a Gaussian blur on this captured bitmap, then place this altered bitmap behind the skin. This would have to be done on EVERY Update / Redraw of the skin. The resources used are going to be hideous.

And all that show-stopping nastiness is the good news... The bad news is that even if we could and wanted to do that, it just wouldn't even begin to work. A skin is updated and redrawn every Update milliseconds, presumably 1000, or once a second. if WE rolled our own blur, the best we could shoot for in this case is to have the blur updated once a second. However, it's not Rainmeter that is managing things when you drag a skin around on the screen, it's Windows. Windows is going to cheerfully allow you to drag the skin, redraw the screen, and the blurred area behind the skin will be somewhere from 0 to 1000 milliseconds behind what is really behind the skin now. What is blurred in the skin will "lag" behind reality. This would be completely unusable.

Microsoft is much "closer to the metal" in this regard, since it is really Windows that is redrawing the screen, and this will just be impractical (I believe) if we aren't able to plug in to some underlying operating system functionality. I'm sure that Windows actually just directly blurs the desired area as the entire screen is being redrawn in the first place, and doesn't need to do any kind of capture / blur / overlay approach that just adds tons of processing to things.

Clearly the underlying ability is still there in Windows, just look at the Start Menu, Action Center and Taskbar. However, they have removed this as something they "expose" to developers for application development, and at least for now it's deep inside the core code and getting at it, even in the less robust "on or off for the entire window" method currently possible, would really be an unsupported and unreliable "hack".

The long and the short of it is that if Windows decides to implement and support an API method of doing custom blur areas in an windowed application, (which they had in Win7 and so far don't in Win10) then we are likely to jump on it. If they don't, this is just not going to happen.

I predict they don't. While they are still using "blur" on what are in effect "non-windowed" OS elements like Start Menu and Action Center, they have decided, whether you like it or not, that "Aero Blur" is NOT part of the ascetic designed into Windows 10 applications. It's dead... Might want to get over it.
Ragingwasabi
Posts: 86
Joined: March 7th, 2015, 2:23 pm

Re: Background blur for Windows 10

Post by Ragingwasabi »

aww dam. gonna miss dat shit :p
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: Background blur for Windows 10

Post by theAzack9 »

Ragingwasabi wrote:aww dam. gonna miss dat shit :p
I understand why they don't want to implement this into Rainmeter, but it doesn't stop me from doing it ;)

If you want a temporary solution you could check out my plugin which basically uses the way you described to achieve the effect ;)

https://forum.rainmeter.net/viewtopic.php?f=18&t=23106

I can't guarantee that this solution will work forever, but it works for now atleast :p
Ragingwasabi
Posts: 86
Joined: March 7th, 2015, 2:23 pm

Re: Background blur for Windows 10

Post by Ragingwasabi »

Wow thats really cool! too bad it blurs everything in the window, other wise this works perfectly for now