From b2471667e1377df998ec50a6f952f3d164e73e3d Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周三, 27 12月 2023 04:21:30 +0800
Subject: [PATCH] Add style option back

---
 src/core/style/styleagent_win.cpp |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/core/style/styleagent_win.cpp b/src/core/style/styleagent_win.cpp
index bee647a..6b77012 100644
--- a/src/core/style/styleagent_win.cpp
+++ b/src/core/style/styleagent_win.cpp
@@ -30,9 +30,7 @@
                         return true;
 
                     case WM_SETTINGCHANGE: {
-                        if (!msg->wParam && msg->lParam &&
-                            std::wcscmp(reinterpret_cast<LPCWSTR>(msg->lParam), L"ImmersiveColorSet") ==
-                            0) {
+                        if (isImmersiveColorSetChange(msg->wParam, msg->lParam)) {
                             return true;
                         }
                         break;
@@ -55,10 +53,7 @@
                     }
                 }();
                 for (auto &&ap : std::as_const(*g_styleAgentSet())) {
-                    if (ap->systemTheme != theme) {
-                        ap->systemTheme = theme;
-                        ap->notifyThemeChanged(theme);
-                    }
+                    ap->notifyThemeChanged(theme);
                 }
             }
 

--
Gitblit v1.9.1