diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-03-19 06:40:53 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-04-04 20:04:57 +0200 |
commit | 9feeb324eddd9ed73ae667e10275f663d70f7544 (patch) | |
tree | 89175184ae18aea506bf91a98f49b54da097b963 /video/img_format.h | |
parent | 68b3239b523cd75ba0a12f680ac7bc77e5647d40 (diff) | |
download | mpv-9feeb324eddd9ed73ae667e10275f663d70f7544.tar.bz2 mpv-9feeb324eddd9ed73ae667e10275f663d70f7544.tar.xz |
win32: follow Windows settings and update dark mode state
Microsoft documented how to enable dark mode for title bar:
https://learn.microsoft.com/windows/apps/desktop/modernize/apply-windows-themes
https://learn.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
Documentation says to set the DWMWA_USE_IMMERSIVE_DARK_MODE attribute to
TRUE to honor dark mode for the window, FALSE to always use light mode.
While in fact setting it to TRUE causes dark mode to be always enabled,
regardless of the settings. Since it is quite unlikely that it will be
fixed, just use UxTheme API to check if dark mode should be applied and
while at it enable it fully. Ideally this function should only call the
DwmSetWindowAttribute(), but it just doesn't work as documented.
Fixes: #6901
Diffstat (limited to 'video/img_format.h')
0 files changed, 0 insertions, 0 deletions