Skip to content

Conversation

@XueshiQiao
Copy link

ref: https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute

DWMWA_USE_IMMERSIVE_DARK_MODE
Use with DwmSetWindowAttribute. Allows the window frame for this window to be drawn in dark mode colors when the dark mode system setting is enabled. For compatibility reasons, all windows default to light mode regardless of the system setting. The pvAttribute parameter points to a value of type BOOL. TRUE to honor dark mode for the window, FALSE to always use light mode.

This value is supported starting with Windows 11 Build 22000.

"For compatibility reasons, all windows default to light mode regardless of the system setting"

So i think we should reset to default mode in clear_mica()
And it performs well when switching theme(dark->light, or light->dark) in tauri applications, it performs weird without the reset operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant