A Windhawk mod for choosing a native DWM window-shadow style on Windows 11.
Windows 11 normally applies a broad, diffuse halo around application windows. DWM Shadow Customizer hooks the native Desktop Window Manager border pipeline and selects one of DWM's own shadow presets. It keeps the rest of the window appearance intact: title bars, borders, rounded corners, Mica, Acrylic, caption buttons, and application content are not replaced.
- Compact native shadow, enabled by default.
- Complete shadow suppression.
- Six selectable native behaviors, including the Windows-selected default.
- No helper process, overlay windows, external DLLs, or installer.
- Live settings changes for newly rebuilt window resources.
- Bounded optional diagnostic logging.
- Graceful initialization failure when the required DWM symbol is unavailable.
| Preset | Native value | Observed appearance |
|---|---|---|
| System default | -1 |
DWM chooses according to the window and state. |
| No shadow | 0 |
Disables the native DWM shadow. |
| Balanced | 2 |
Light-to-medium native shadow. |
| Diffuse | 3 |
Broadest and darkest observed shadow. |
| Compact | 4 |
Lightest and tightest observed shadow. |
| Strong | 5 |
Medium-wide shadow with greater contrast. |
These names describe observed behavior on the tested Windows build. The underlying values are undocumented DWM enums, not Microsoft-supported APIs.
- Windows 11 x64.
- Windhawk.
- Permission for Windhawk to inject into
dwm.exe.
The mod was developed and visually tested on Windows 11 25H2 build
26200.8894. It can work on other Windows 11 builds when Windhawk can resolve
the required public symbol in uDWM.dll, but those builds are not yet claimed
as tested.
- Open Windhawk.
- Create a new mod.
- Replace the generated source with
dwm-shadow-customizer.wh.cpp. - Compile the mod with the button on the left or press
Ctrl+B. - In Windhawk, open Settings → Advanced settings → More advanced settings.
- Add
dwm.exeto the process inclusion list. - Enable the mod and select a shadow preset.
When the mod is accepted into the Windhawk community repository, it can be installed directly from Windhawk instead.
- Enable custom shadow style: turn the override on or return to DWM's normal selection.
- Shadow preset: choose System default, No shadow, Balanced, Diffuse, Compact, or Strong.
- Diagnostic logging: log a rate-limited sample of native and effective shadow-style values.
- DWM caches shadow resources per window. A window that already exists when a setting changes can retain its old shadow. Close and reopen that window to apply the new preset.
- The mod selects discrete native presets. It does not independently control Gaussian blur radius, geometric spread, X/Y offset, or alpha.
- DWM internals are undocumented and can change in future Windows updates.
- Custom application-rendered shadows are outside the native DWM border path and cannot be changed by this mod.
This mod runs in and hooks dwm.exe, a critical Windows process. It:
- resolves the target by symbol name and delegates detour installation to Windhawk;
- contains no hard-coded addresses or custom byte-pattern patches;
- leaves every non-shadow argument unchanged;
- performs no deliberate heap allocation or window enumeration in the normal hook path;
- switches to native pass-through behavior during unload;
- refuses to initialize if the required symbol cannot be resolved.
Despite these precautions, any mod that hooks undocumented DWM internals can be affected by Windows updates. Disable the mod if a new Windows build causes visual corruption or compositor instability.
The investigation and architectural alternatives are documented in
RESEARCH.md. Relevant references include Windhawk's Bring
Back the Borders!, Window Border Customizer, Custom Window Corner Radius, and
the DWMBlurGlass project.