Releases: ALTaleX531/OpenGlass
v2.0.5.1736-legacy
v2.0.4.1734-legacy
What's Changed
- Fixed aero peek clone behaviour by @tetawaves in #121
- Fixed #116
- Fixed #124
- Fixed #113 by introducing a new reflection rendering mechanism without using dcomp
- Fixed blur shifting issue
- Fixed blur oversampling issue
New Contributors
- @tetawaves made their first contribution in #121
Full Changelog: v2.0.3.1713-legacy...v2.0.4.1733-legacy
v2.0.3.1713-legacy
What's Changed
Details
- starting with this release, accent overrider will take effect for both blur and acrylic blur.
- always use glass safe zones when accent overrider is enabled, even if no glass areas are detected, which would resolve #102.
- the aero shader has been rolled back to use ps_4_0_level_9_3 to ensure compatibility
- zero-copy rendering had stricter checks
Bonus
// ==WindhawkMod==
// @id sxb-w7-shell-ui-accent-overrider
// @name SXB Win7 Shell UI Accent Overrider
// @description Override accent to dwm blur behind for sxb shell ui
// @version 1.1
// @author ALTaleX
// @github https://github.com/ALTaleX531
// @include explorer.exe
// @compilerOptions -ldwmapi -lgdi32
// ==/WindhawkMod==
#include <windhawk_api.h>
#include <wingdi.h>
#include <winuser.h>
#include <dwmapi.h>
struct ACCENT_POLICY
{
DWORD AccentState;
DWORD AccentFlags;
DWORD dwGradientColor;
DWORD dwAnimationId;
};
enum WINDOWCOMPOSITIONATTRIBUTE
{
WCA_ACCENT_POLICY = 19
};
struct WINDOWCOMPOSITIONATTRIBUTEDATA
{
WINDOWCOMPOSITIONATTRIBUTE Attribute;
PVOID pvData;
SIZE_T cbData;
};
BOOL (WINAPI *pOriginalSetWindowCompositionAttribute)(HWND, const WINDOWCOMPOSITIONATTRIBUTEDATA*);
BOOL WINAPI SetWindowCompositionAttributeHook(HWND hWnd, const WINDOWCOMPOSITIONATTRIBUTEDATA* data)
{
auto& accentPolicy = *reinterpret_cast<ACCENT_POLICY*>(data->pvData);
if (
data->Attribute != WCA_ACCENT_POLICY ||
(
RegisterWindowMessageW(L"DV2ControlHost") != GetClassWord(hWnd, GCW_ATOM) &&
RegisterWindowMessageW(L"Shell_TrayWnd") != GetClassWord(hWnd, GCW_ATOM) &&
RegisterWindowMessageW(L"Shell_SecondaryTrayWnd") != GetClassWord(hWnd, GCW_ATOM) &&
RegisterWindowMessageW(L"SIBJumpView") != GetClassWord(hWnd, GCW_ATOM) &&
(!GetModuleHandleW(L"StartAllBackX64.dll") || RegisterWindowMessageW(L"TaskListThumbnailWnd") != GetClassWord(hWnd, GCW_ATOM))
)
)
{
return pOriginalSetWindowCompositionAttribute(hWnd, data);
}
if (accentPolicy.AccentState == 1)
{
DWM_BLURBEHIND blurBehind
{
.dwFlags = DWM_BB_ENABLE
};
DwmEnableBlurBehindWindow(hWnd, &blurBehind);
return pOriginalSetWindowCompositionAttribute(hWnd, data);
}
DWM_BLURBEHIND blurBehind
{
.dwFlags = DWM_BB_ENABLE,
.fEnable = accentPolicy.AccentState != 0
};
DwmEnableBlurBehindWindow(hWnd, &blurBehind);
ACCENT_POLICY replacedAccentPolicy{};
WINDOWCOMPOSITIONATTRIBUTEDATA replacedData
{
.Attribute = WCA_ACCENT_POLICY,
.pvData = &replacedAccentPolicy,
.cbData = sizeof(replacedAccentPolicy)
};
return pOriginalSetWindowCompositionAttribute(hWnd, &replacedData);
}
decltype(&SetWindowRgn) pOriginalSetWindowRgn;
int WINAPI SetWindowRgnHook(HWND hWnd, HRGN hRgn, WINBOOL bRedraw)
{
if (
RegisterWindowMessageW(L"DV2ControlHost") != GetClassWord(hWnd, GCW_ATOM)
)
{
return pOriginalSetWindowRgn(hWnd, hRgn, bRedraw);
}
ACCENT_POLICY accentPolicy{};
WINDOWCOMPOSITIONATTRIBUTEDATA data
{
.Attribute = WCA_ACCENT_POLICY,
.pvData = &accentPolicy,
.cbData = sizeof(accentPolicy)
};
pOriginalSetWindowCompositionAttribute(hWnd, &data);
return pOriginalSetWindowRgn(hWnd, hRgn, bRedraw);
}
HRESULT (WINAPI *pOriginalDwmpUpdateAccentBlurRect)(HWND, LPCRECT);
HRESULT WINAPI DwmpUpdateAccentBlurRectHook(HWND hWnd, LPCRECT lprc)
{
if (
RegisterWindowMessageW(L"TaskListThumbnailWnd") != GetClassWord(hWnd, GCW_ATOM) &&
RegisterWindowMessageW(L"SIBJumpView") != GetClassWord(hWnd, GCW_ATOM)
)
{
return pOriginalDwmpUpdateAccentBlurRect(hWnd, lprc);
}
ACCENT_POLICY accentPolicy{};
WINDOWCOMPOSITIONATTRIBUTEDATA data
{
.Attribute = WCA_ACCENT_POLICY,
.pvData = &accentPolicy,
.cbData = sizeof(accentPolicy)
};
pOriginalSetWindowCompositionAttribute(hWnd, &data);
HRESULT hr{ S_OK };
DWM_BLURBEHIND blurBehind
{
.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION,
.fEnable = TRUE,
.hRgnBlur = CreateRoundRectRgn(lprc->left, lprc->top, lprc->right, lprc->bottom + 2, 4, 4)
};
hr = DwmEnableBlurBehindWindow(hWnd, &blurBehind);
DeleteObject(blurBehind.hRgnBlur);
return hr;
}
// The mod is being initialized, load settings, hook functions, and do other
// initialization stuff if required.
BOOL Wh_ModInit()
{
Wh_Log(L"Init");
pOriginalSetWindowCompositionAttribute = reinterpret_cast<decltype(pOriginalSetWindowCompositionAttribute)>(GetProcAddress(GetModuleHandleW(L"user32.dll"), "SetWindowCompositionAttribute"));
pOriginalDwmpUpdateAccentBlurRect = reinterpret_cast<decltype(pOriginalDwmpUpdateAccentBlurRect)>(GetProcAddress(GetModuleHandleW(L"dwmapi.dll"), MAKEINTRESOURCEA(159)));
Wh_SetFunctionHook(reinterpret_cast<void*>(SetWindowRgn), reinterpret_cast<void*>(SetWindowRgnHook), reinterpret_cast<void**>(&pOriginalSetWindowRgn));
Wh_SetFunctionHook(reinterpret_cast<void*>(pOriginalSetWindowCompositionAttribute), reinterpret_cast<void*>(SetWindowCompositionAttributeHook), reinterpret_cast<void**>(&pOriginalSetWindowCompositionAttribute));
Wh_SetFunctionHook(reinterpret_cast<void*>(pOriginalDwmpUpdateAccentBlurRect), reinterpret_cast<void*>(DwmpUpdateAccentBlurRectHook), reinterpret_cast<void**>(&pOriginalDwmpUpdateAccentBlurRect));
return TRUE;
}
void Wh_ModAfterInit()
{
ACCENT_POLICY accentPolicy
{
.AccentState = 3
};
WINDOWCOMPOSITIONATTRIBUTEDATA data
{
.Attribute = WCA_ACCENT_POLICY,
.pvData = &accentPolicy,
.cbData = sizeof(accentPolicy)
};
if (const auto hWnd = FindWindowW(L"DV2ControlHost", nullptr); hWnd)
{
SetWindowCompositionAttributeHook(hWnd, &data);
}
if (const auto hWnd = FindWindowW(L"Shell_TrayWnd", nullptr); hWnd)
{
SetWindowCompositionAttributeHook(hWnd, &data);
}
if (const auto hWnd = FindWindowW(L"Shell_SecondaryTrayWnd", nullptr); hWnd)
{
SetWindowCompositionAttributeHook(hWnd, &data);
}
if (const auto hWnd = FindWindowW(L"TaskListThumbnailWnd", nullptr); hWnd)
{
SetWindowCompositionAttributeHook(hWnd, &data);
}
}
// The mod is being unloaded, free all allocated resources.
void Wh_ModUninit()
{
Wh_Log(L"Uninit");
ACCENT_POLICY accentPolicy
{
.AccentState = 4,
.AccentFlags = 0x13,
.dwGradientColor = 1
};
WINDOWCOMPOSITIONATTRIBUTEDATA data
{
.Attribute = WCA_ACCENT_POLICY,
.pvData = &accentPolicy,
.cbData = sizeof(accentPolicy)
};
DWM_BLURBEHIND blurBehind
{
.dwFlags = DWM_BB_ENABLE
};
if (const auto hWnd = FindWindowW(L"DV2ControlHost", nullptr); hWnd)
{
pOriginalSetWindowCompositionAttribute(hWnd, &data);
DwmEnableBlurBehindWindow(hWnd, &blurBehind);
}
if (const auto hWnd = FindWindowW(L"Shell_TrayWnd", nullptr); hWnd)
{
pOriginalSetWindowCompositionAttribute(hWnd, &data);
DwmEnableBlurBehindWindow(hWnd, &blurBehind);
}
if (const auto hWnd = FindWindowW(L"Shell_SecondaryTrayWnd", nullptr); hWnd)
{
pOriginalSetWindowCompositionAttribute(hWnd, &data);
DwmEnableBlurBehindWindow(hWnd, &blurBehind);
}
if (const auto hWnd = FindWindowW(L"TaskListThumbnailWnd", nullptr); hWnd)
{
accentPolicy =
{
.AccentState = 3,
.AccentFlags = 0x200
};
data.pvData = &accentPolicy;
pOriginalSetWindowCompositionAttribute(hWnd, &data);
DwmEnableBlurBehindWindow(hWnd, &blurBehind);
}
}
Full Changelog: v2.0.3.1702-legacy...v2.0.3.1713-legacy
v2.0.3.1703-legacy
What's Changed
fixed #99.
Details
- ensured that the scaling effect comes after the cropping effect, which prevents low-end GPUs from getting into a performance bottleneck.
- zero-copy rendering has been introduced to allow blur effects to use the screen back buffer directly as an effect input, which avoids the overhead of creating an intermediate buffer and copying the screen contents to the buffer.
unfortunately, this feature will only be triggered when the glass geometry consists of only one rectangle, or it might cause graphics flaws. - introduced a blur overdraw mitigation mechanism that will lower the blur quality and force the zero-copy rendering feature to be enabled if any glass area is completely covered by another, larger glass area.
- adjusted the mode of internal scaling of the glass effect for different
BlurOptimization
to improve the blur quality, it is now recommended to setBlurOptimization
to 0.
Full Changelog: v2.0.2.1689-legacy...v2.0.3.1702-legacy
OpenGlass Legacy v2.0.2.1689
What's Changed
- Restored v1's blur sampling framework and added some optimizations like glass8, this should hopefully fix #99.
- Updated the README documentation.
Full Changelog: v2.0.1.1686-legacy...v2.0.2.1689-legacy
OpenGlass Legacy v2.0.1.1686
What's Changed
Full Changelog: v2.0.0.1674-legacy...v2.0.1.1686-legacy
OpenGlass Legacy v2.0.0.1674
Important
This version isn't finished or as perfect as it could be, but I don't have much time left to develop it, so I'm releasing it now. The reflection part hasn't been refactored with dcomp yet, and right now I haven't done a lot of testing, so there could be all sorts of bugs.
I'm sorry. I tried my best.
Note
This build is outdated and contains some nasty bugs, but I have fixed it in the latest source code, try compile OpenGlass yourself.
What's Changed
- added language support for zh-tw
- added support for win11 21h2
- added support for win11 22h2
- added support for win11 23h2
- added support for win11 24h2
- added stricter check for os build number
- added integrity check for symbols
- added progress dialog for symbol downloading
- optimized the performance of symbol loading
- fixed an issue where symbols could not be downloaded in some cases
- changed warning text for symbol loading failures
- refactored the functionality of symbol projection, which now allows calling udwm and dwmcore functions faster
- added support for energy saver introduced in win11 24h2
- added DisableMemoryDump to adjust whether to generate a memory dump when dwm crashes, this option is only valid when located in HKLM
- added force quit support, current dwm process will be terminated after pressing ctrl+win+shift+b+esc.
- changed behavior under power saving mode/transparency disabled.
- changed named pipe permission, now only dwm can communicate with the host process, which will significantly enhance security
- changed the service architecture so that the host process is now responsible for creating initialization/uninitialization threads.
- scheduled task now uses com handler to start host process, and host process can now be managed directly in the task scheduler.
- deleted ForceAccentColorization, colors will only be read from ColorizationColor related registry items
- added opaque support for glass effects
- added ColorizationColorInactive to control the color of inactive windows
- added ColorizationOpaqueBlendColor to control the base color of opaque blending
- added GlassOpacityInactive to control the glass opacity of inactive windows.
- added ColorizationColorCaptionInactive to control the title bar text color of inactive windows
- added DisableModernBorders
- added support for glass safety zones
- added BlurOptimization to adjust blur quality, 0 for speed first, 1 for balance, 2 for quality first
- accent overrider no longer overrides accent acrylic blur, now it only overrides accent blur (explorer blur)
- deleted EnableGeometryMerging
- refactored aero effect, which now using custom hlsl shader for better accuracy and performance
- refactored the glass renderer, which will now use less memory
- optimized blur rendering by using a solid color brush to fill in when the blur radius is 0 instead of a d2d effect
- optimized the behavior of sampling, which will now use the back buffer directly as input for d2d effects
- restored the fade animation of aero peek from win11 21h2 to 23h2
- added ColorizationGlassReflectionPolicy to control where reflections should be rendered.
- added a mitigation measure for abnormal live preview offsets in aero peek
- added ColorizationGlassReflectionIntensityInactive to control the reflection opacity of inactive windows.
- reflections will be stretched across the entire desktop instead of individual monitors
- fixed an issue where the title bar text was abnormally shifted
- deleted TextGlowSize
- deleted CustomThemeMsstyle
- deleted CustomThemeMsstyleUseDefaults
- added support for TextGlowMode
- added support for CustomThemeAtlas
- added a new optional value of 2 for CenterCaption, which mimics the win8 title bar text centering behavior
- removed compatibility with RoundRectRadius wrong handling behavior in glass8
Warning
A special reminder to certain transformation pack makers: you must comply with the open source license.
Any modified OpenGlass binary builds you release must have their code open-sourced under GPL v3.
Full Changelog: v1.3-legacy...v2.0.0.1674-legacy
v1.3-dcomp
Added 24H2 support. (#38)
Note
For those of you who are not using 24H2, there is no need for you to update, there are no optimizations or improvements or bug fixes in this build!
Full Changelog: ALTaleX531/OpenGlass.dcomp@v1.2.1...v1.3
OpenGlass Legacy v1.4
What's Changed
- Brought back the reflection of
Aero Snap
- Brought back the reflection of
Aero Peek
- Optimized rendering of reflection in opening/closing animations
Note
This version has not been extensively tested and may be unstable, use at your own risk.
Full Changelog: v1.3-legacy...v1.4-legacy
OpenGlass Legacy v1.3
What's Changed
- Optimized blur rendering of DwmEnableBlurBehind region.
- Added experimental option
EnableFullDirty
, read the README to learn more.
Full Changelog: v1.2-legacy-patch-2...v1.3