# gpui: Use DWM API for backdrop effects and add Mica/Mica Alt support \(\#41842\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/917148c5ce6b4801dee7ab191b6fb5144f84d0ea)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 917148c5ce6b4801dee7ab191b6fb5144f84d0ea

Requested commit: 917148c5ce6b4801dee7ab191b6fb5144f84d0ea

Commit: 917148c5ce6b4801dee7ab191b6fb5144f84d0ea

Tree: ff8d377cd05f30ff42c748b904938b91c89d9df9

Author: Barani S

Committer: GitHub

## Message

```
gpui: Use DWM API for backdrop effects and add Mica/Mica Alt support (#41842)

This PR updates window background rendering to use the **official DWM
backdrop API** (`DwmSetWindowAttribute`) instead of the legacy
`SetWindowCompositionAttribute`.
It also adds **Mica** and **Mica Alt** options to
`WindowBackgroundAppearance` for native Windows 11 effects.

### Motivation

Enables modern, stable, and GPU-accelerated backdrops consistent with
Windows 11’s Fluent Design.
Removes reliance on undocumented APIs while maintaining backward
compatibility with older Windows versions.

### Changes

* Added `MicaBackdrop` and `MicaAltBackdrop` variants.
* Switched to DWM API for applying backdrop effects.
* Verified fallback behavior on Windows 10.

### Release Notes:

- Added `WindowBackgroundAppearance::MicaBackdrop` and
`WindowBackgroundAppearance::MicaAltBackdrop` for Windows 11 Mica and
Mica Alt window backdrops.

### Screenshots

- `WindowBackgroundAppearance::Blurred`
<img width="553" height="354" alt="image"
src="https://github.com/user-attachments/assets/57c9c25d-9412-4141-94b5-00000cc0b1ec"
/>

- `WindowBackgroundAppearance::MicaBackdrop`
<img width="553" height="354" alt="image"
src="https://github.com/user-attachments/assets/019f541c-3335-4c9e-b026-71f5a1786534"
/>

- `WindowBackgroundAppearance::MicaAltBackdrop`
<img width="553" height="354" alt="image"
src="https://github.com/user-attachments/assets/5128d600-c94d-4c89-b81a-8b842fe1337a"
/>

---------

Co-authored-by: John Tur <john-tur@outlook.com>
```

## Parents

- [951132fc13dca54ce6e8c3e8114b885916099a00](https://git.cafe/gitcafe/zed/commit/951132fc13dca54ce6e8c3e8114b885916099a00?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/917148c5ce6b4801dee7ab191b6fb5144f84d0ea?format=markdown)
