summaryrefslogtreecommitdiffstats
path: root/widget/windows/nsWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'widget/windows/nsWindow.cpp')
-rw-r--r--widget/windows/nsWindow.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
index 2172f2aa0..85321a189 100644
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -5084,12 +5084,19 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
case WM_SETTINGCHANGE:
{
- if (IsWin10OrLater() && mWindowType == eWindowType_invisible && lParam) {
+ if (lParam) {
auto lParamString = reinterpret_cast<const wchar_t*>(lParam);
- if (!wcscmp(lParamString, L"UserInteractionMode")) {
- nsCOMPtr<nsIWindowsUIUtils> uiUtils(do_GetService("@mozilla.org/windows-ui-utils;1"));
- if (uiUtils) {
- uiUtils->UpdateTabletModeState();
+ if (!wcscmp(lParamString, L"ImmersiveColorSet")) {
+ // WM_SYSCOLORCHANGE is not dispatched for accent color changes
+ OnSysColorChanged();
+ break;
+ }
+ if (IsWin10OrLater() && mWindowType == eWindowType_invisible) {
+ if (!wcscmp(lParamString, L"UserInteractionMode")) {
+ nsCOMPtr<nsIWindowsUIUtils> uiUtils(do_GetService("@mozilla.org/windows-ui-utils;1"));
+ if (uiUtils) {
+ uiUtils->UpdateTabletModeState();
+ }
}
}
}
@@ -7131,6 +7138,11 @@ nsWindow::OnSysColorChanged()
// so all presentations get notified properly.
// See nsWindow::GlobalMsgWindowProc.
NotifySysColorChanged();
+ // On Windows 10 only, we trigger a theme change to pick up changed media
+ // queries that are needed for accent color changes.
+ if (IsWin10OrLater()) {
+ NotifyThemeChanged();
+ }
}
}