Maplespe / DWMBlurGlass

Add custom effect to global system title bar, support win10 and win11.
GNU Lesser General Public License v3.0
2.09k stars 93 forks source link

Caption buttons misalign #140

Closed Tamim468 closed 9 months ago

Tamim468 commented 9 months ago

When I bring back the window borders in windows 11 23H2 using a windhawk mod and winaero tweaker and I turn on "Decrease titlebar button height" setting, The caption buttons are now misaligned.

This only happens when "Decrease titlebar button height (win7 style)" setting is turned on.

image

Here's my border settings in winaero tweaker image

Windhawk mod for windows 11 udwm patch: https://www.mediafire.com/file/1w3of5m2y4q6xyz/w11-dwm-fix.wh.cpp/file (so you can reproduce the issue) and the msstyle I use: https://www.mediafire.com/file/zltv2moi5wjenjn/yes.msstyles/file (aero10 msstyle will not work for me so i use this)

I am using Windows 11 23H2 (Build 22631.3085)

teknixstuff commented 9 months ago

I believe the issue is in my WindHawk mod, but it could also be fixed on the DWMBG side of things quite easily.

Tamim468 commented 9 months ago

I believe the issue is in my WindHawk mod, but it could also be fixed on the DWMBG side of things quite easily.

But the issue does not happen when I turn off the setting so I believe it may be dwmblurglass issue, hence it's worth a try to report this.

teknixstuff commented 9 months ago

I believe the issue is in my WindHawk mod, but it could also be fixed on the DWMBG side of things quite easily.

But the issue does not happen when I turn off the setting so I believe it may be dwmblurglass issue, hence it's worth a try to report this.

Yes, that is possible.

Arthurgamepraix commented 9 months ago

Maybe since Windows 11 does not have any borders DWMBlurGlass may have code to just shrink the buttons and place at the corner, since Windows 11 has a different DWM than Windows 10.

teknixstuff commented 9 months ago

After further testing I've diagnosed it's a DWMBlurGlass issue, not my WindHawk patch's fault.

Maplespe commented 9 months ago

We use dwm's internal api to get the inner window margins . In the old days we read the registry border value, but then we realized that it doesn't work for all themes, so we changed it to the current one, where the margins are controlled by the theme. We are looking for a way to get the best of both worlds, but there isn't one yet. Win11 doesn't have real borders so that causes this.

teknixstuff commented 9 months ago

We use dwm's internal api to get the inner window margins . In the old days we read the registry border value, but then we realized that it doesn't work for all themes, so we changed it to the current one, where the margins are controlled by the theme. We are looking for a way to get the best of both worlds, but there isn't one yet. Win11 doesn't have real borders so that causes this.

After even more testing I've come up with a fix in my patch that makes DWMBG work correctly.

teknixstuff commented 9 months ago

You can close the issue now

Tamim468 commented 9 months ago

We use dwm's internal api to get the inner window margins . In the old days we read the registry border value, but then we realized that it doesn't work for all themes, so we changed it to the current one, where the margins are controlled by the theme. We are looking for a way to get the best of both worlds, but there isn't one yet. Win11 doesn't have real borders so that causes this.

After even more testing I've come up with a fix in my patch that makes DWMBG work correctly.

I will be waiting for it to release before I close this issue, Congrats!

Tamim468 commented 9 months ago

Solution: https://windhawk.net/mods/w11-dwm-fix