Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows 11 Taskbar Styler] Acrylic background doesn't work with multiple monitors #742

Open
MuscularPuky opened this issue Jun 20, 2024 · 22 comments
Labels
mod-bug Something isn't working with a mod

Comments

@MuscularPuky
Copy link

sry for too late the issue but I was going to busy until Sep

in v1.3.3, there's acrylic background styling bug with multi monitor. v1.3.4 is the hoxfix for that multi monitor bug but it made the bug worse.

v1.3.3, only secondary taskbar lost background but now v1.3.4, all taskbars lost background. when I reload mod, the taskbars have default background in initial 0.1~0.2s but it gradually faded soon.

on single monitor, the acrylic background works well.

@MuscularPuky MuscularPuky added the mod-bug Something isn't working with a mod label Jun 20, 2024
@m417z
Copy link
Member

m417z commented Jun 26, 2024

For some reason, setting an acrylic background for both taskbars doesn't work. Setting only of them, either one, works.

Here you can see setting both with a delay:

ZFfxKfNQOO.mp4

@m417z m417z changed the title [Windows 11 Taskbar Styler] Actually v1.3.4 fix made the bug worse [Windows 11 Taskbar Styler] Acrylic background doesn't work with multiple monitors Jun 26, 2024
@MuscularPuky
Copy link
Author

For some reason, setting an acrylic background for both taskbars doesn't work. Setting only of them, either one, works.

Here you can see setting both with a delay:

ZFfxKfNQOO.mp4

THX for your hint I did it #29
it's not code issue. maybe kind of XAML limitation. but I don't know why it cause
anyways we can bypass this problem through add more parameter, and still solvable—without bypass—by edit the mod code—to use other hook method
very teresting parameters 🤔 I'll studying more about these

@m417z
Copy link
Member

m417z commented Jun 27, 2024

Edit

This is incorrect, see the next comment for a clarification.

Original comment

The following seems to work (suggested by @ahmed605):

  • Add BackgroundSource="HostBackdrop" to the style, for example, target Rectangle#BackgroundFill and style:
Fill:=<AcrylicBrush BackgroundSource="HostBackdrop" TintColor="Transparent" TintOpacity="0" TintLuminosityOpacity="0" Opacity="1"/>
  • Enable Host Backdrop for the taskbars as following:
ACCENTPOLICY policy = { ACCENT_ENABLE_BLURBEHIND, 0, 0, 0 };
WINCOMPATTRDATA data = { WCA_ACCENT_POLICY, &policy, sizeof(policy) };
SetWindowCompositionAttribute(hWnd, &data);

I can make the mod to enable Host Backdrop for the taskbar, but I'm not sure what the implications are, especially since most users probably don't use a custom acrylic background.

@m417z
Copy link
Member

m417z commented Jun 27, 2024

My previous message is incorrect. I was about to try ACCENT_ENABLE_HOSTBACKDROP, but tried ACCENT_ENABLE_BLURBEHIND instead. ACCENT_ENABLE_HOSTBACKDROP doesn't seem to work.

What works is just setting ACCENT_ENABLE_BLURBEHIND with SetWindowCompositionAttribute (BackgroundSource="HostBackdrop" isn't necessary), but it also results in a slightly different effect.

@MuscularPuky
Copy link
Author

I tried HostBackdrop in previous version but was no luck as I remember. ah—I don't remeber clearly I was racking my brain for implement acrylic back then
if it shouldve been worked Ive typed wrong xaml syntax back then

Yes. Windows has 2 or 3 acrylic method based on its version but I haven't met the blur method on UWP. if it can use itll be maybe BackdropBlurBrush?? I can't sure... I'm not versed in UWP

@ghost
Copy link

ghost commented Sep 22, 2024

Hi I'm having the exact same problem - making the background acrylic doesn't work, only transparent, default, or a solid color. I have two monitors (though it doesn't seem to work on a single one either).

My previous message is incorrect. I was about to try ACCENT_ENABLE_HOSTBACKDROP, but tried ACCENT_ENABLE_BLURBEHIND instead. ACCENT_ENABLE_HOSTBACKDROP doesn't seem to work.

What works is just setting ACCENT_ENABLE_BLURBEHIND with SetWindowCompositionAttribute (BackgroundSource="HostBackdrop" isn't necessary), but it also results in a slightly different effect.

I don't have programming knowledge, could you perhaps tell me how to implement that?

The only reason I'm using windhawk was to make the taskbar rounded and blurry, it'd be sucky for me if it only could do the first

@MuscularPuky
Copy link
Author

Hi I'm having the exact same problem - making the background acrylic doesn't work, only transparent, default, or a solid color. I have two monitors (though it doesn't seem to work on a single one either).

My previous message is incorrect. I was about to try ACCENT_ENABLE_HOSTBACKDROP, but tried ACCENT_ENABLE_BLURBEHIND instead. ACCENT_ENABLE_HOSTBACKDROP doesn't seem to work.
What works is just setting ACCENT_ENABLE_BLURBEHIND with SetWindowCompositionAttribute (BackgroundSource="HostBackdrop" isn't necessary), but it also results in a slightly different effect.

I don't have programming knowledge, could you perhaps tell me how to implement that?

The only reason I'm using windhawk was to make the taskbar rounded and blurry, it'd be sucky for me if it only could do the first

it's known issue and unfortunately there's no silver bullet so far as I kwno

@m417z
Copy link
Member

m417z commented Sep 28, 2024

I've implemented the ACCENT_ENABLE_BLURBEHIND alternative in the following mod: Taskbar Background Helper.
You can set the taskbar background to transparent and use it for handling the background instead.

@JotaRata
Copy link

Taskbar Background Helper doesn't seem to work:(

@m417z
Copy link
Member

m417z commented Oct 12, 2024

@JotaRata what do you mean by that? What do you see? Did you try changing the settings?

@JotaRata
Copy link

The same I had with Taskbar Styler before.
To test it, I temporarely set the theme to "Translucent taskbar" and enabled Taskbar Background Helper and I see the same semi-transparent solid color taskbar when using two monitors when using the Blur and Acrylic blur background styles.

imagen

@m417z
Copy link
Member

m417z commented Oct 12, 2024

Did you maximize a window? By default the mod only sets a background when a window is maximized.

@JotaRata
Copy link

No, I disabled the option to only be active when having a maximized window

@JotaRata
Copy link

Setting the whole background to Transparent has the same effect:
(This is my second monitor, though the first looks the same)

imagen

@m417z
Copy link
Member

m417z commented Oct 12, 2024

What about other background styles? Does anything else work?
Also, do you have "Transparency effects" enabled in system settings?

@JotaRata
Copy link

I have them enabled.
Other styles don't work neither, the only difference I see is when choosing a Solid color in Background Helper settings, I see that color when there were transparent areas before. Acrylic and Blur don't work

@m417z
Copy link
Member

m417z commented Oct 12, 2024

OK, so at least something works, the mod is loaded and isn't completely broken. No idea honestly, the mod just uses the standard Windows methods to set these styles. My next guess is that you're either running in some kind of an efficiency/battery saver mode, or that your graphic card is too weak and so Windows doesn't enable some styles.

@JotaRata
Copy link

JotaRata commented Oct 14, 2024

I don't think that's the case, since transparency effects are indeed enabled on my system and translucent/blurry elements such as notifications and start menu are visible. Windhawk also corrrectly sets the translucent effects for the taskbar when using only one monitor.

The problem seems to arise when using two monitors as described previously in other GH issues. Plus I'm testing this issue with a basic install of the two mods

@m417z
Copy link
Member

m417z commented Oct 14, 2024

I don't think that's the case, since transparency effects are indeed enabled on my system and translucent/blurry elements such as notifications and start menu are visible. Windhawk also corrrectly sets the translucent effects for the taskbar when using only one monitor.

That transparency works differently on the OS level, so it's still possible that for some reason some environment condition on your computer doesn't affect that, but affects the method that the Taskbar Background Helper mod uses.

The problem seems to arise when using two monitors as described previously in other GH issues

Yes, that's what this issue is about and it seems to happen for everyone. To sum it up in a table:

→ Setup
↓User
Styler mod blur
Single monitor
Styler mod blur
Multiple monitors
Taskbar Background Helper
Single/multiple monitors
Me and other users
You

@romariossilva
Copy link

turn off the settings "show my taskbar on all display" and it will work.

@highesttt
Copy link

turn off the settings "show my taskbar on all display" and it will work.

That's typically a setting we don't want to turn off...

@nekusu
Copy link

nekusu commented Jan 5, 2025

Would it be feasible to add an option to select specific monitors we want to apply the styles to? That way we could set the acrylic background only on the main taskbar and a solid color for the secondary taskbars. This could be a workaround for this bug and also expand the styling possibilities with the mod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod-bug Something isn't working with a mod
Projects
None yet
Development

No branches or pull requests

6 participants