mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
Remove not needed code for dark mode support under Windows 1809
Remove GetDwmSetWindowAttribute() call intended for Windows version which we no longer support with dark mode. Closes #26634.
This commit is contained in:
committed by
Vadim Zeitlin
parent
f26f253694
commit
ffeeb612cd
@@ -465,10 +465,6 @@ void ConfigureTLW(HWND hwnd)
|
||||
{
|
||||
BOOL useDarkMode = wxMSWImpl::ShouldUseDarkMode();
|
||||
|
||||
// DWMWA_USE_IMMERSIVE_DARK_MODE is 19 for v1809, but is 20 for later
|
||||
// versions, so to set title bar black for both v1809 and later versions,
|
||||
// we try to call GetDwmSetWindowAttribute() with the current value first,
|
||||
// but if it fails, we also retry with the old one.
|
||||
HRESULT hr = wxDarkModeModule::GetDwmSetWindowAttribute()
|
||||
(
|
||||
hwnd,
|
||||
@@ -476,16 +472,6 @@ void ConfigureTLW(HWND hwnd)
|
||||
&useDarkMode,
|
||||
sizeof(useDarkMode)
|
||||
);
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
hr = wxDarkModeModule::GetDwmSetWindowAttribute()
|
||||
(
|
||||
hwnd,
|
||||
19,
|
||||
&useDarkMode,
|
||||
sizeof(useDarkMode)
|
||||
);
|
||||
}
|
||||
if ( FAILED(hr) )
|
||||
wxLogApiError("DwmSetWindowAttribute(USE_IMMERSIVE_DARK_MODE)", hr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user