Add -moz-win-accentcolor(text)

#31 points 1 and 2
This commit is contained in:
wolfbeast 2017-07-19 13:24:55 +02:00 committed by Roy Tam
commit 1f90db3750
7 changed files with 126 additions and 5 deletions

View file

@ -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();
}
}
}
}