From da262e1ef12088ec534b27ed5ffd49fe8ef0c066 Mon Sep 17 00:00:00 2001 From: fxliang Date: Wed, 24 Jan 2024 09:03:21 +0800 Subject: [PATCH] fix: issue #1073 --- WeaselIPCServer/WeaselServerImpl.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/WeaselIPCServer/WeaselServerImpl.cpp b/WeaselIPCServer/WeaselServerImpl.cpp index e9688cf2a..90c6255df 100644 --- a/WeaselIPCServer/WeaselServerImpl.cpp +++ b/WeaselIPCServer/WeaselServerImpl.cpp @@ -60,11 +60,9 @@ void ServerImpl::_Finailize() LRESULT ServerImpl::OnColorChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { - if (uMsg == WM_SETTINGCHANGE && (std::wstring((wchar_t*)lParam) == L"ImmersiveColorSet") || uMsg == WM_DWMCOLORIZATIONCOLORCHANGED) { - if (IsUserDarkMode() != m_darkMode) { - m_darkMode = IsUserDarkMode(); - m_pRequestHandler->UpdateColorTheme(m_darkMode); - } + if (IsUserDarkMode() != m_darkMode) { + m_darkMode = IsUserDarkMode(); + m_pRequestHandler->UpdateColorTheme(m_darkMode); } return 0; }