Update Windows system font change handling (#66021)

The engine now has an explicit API for system font changes, rather than
expecting the WM_FONTCHANGE message to be forwarded to the Flutter view.
This commit is contained in:
stuartmorgan 2020-09-17 18:23:56 -04:00 committed by GitHub
parent eaf3f8b4f7
commit 8162bbd8e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -53,5 +53,12 @@ FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
return *result; return *result;
} }
} }
switch (message) {
case WM_FONTCHANGE:
flutter_controller_->engine()->ReloadSystemFonts();
break;
}
return Win32Window::MessageHandler(hwnd, message, wparam, lparam); return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
} }

View file

@ -187,11 +187,6 @@ Win32Window::MessageHandler(HWND hwnd,
SetFocus(child_content_); SetFocus(child_content_);
} }
return 0; return 0;
// Messages that are directly forwarded to embedding.
case WM_FONTCHANGE:
SendMessage(child_content_, WM_FONTCHANGE, NULL, NULL);
return 0;
} }
return DefWindowProc(window_handle_, message, wparam, lparam); return DefWindowProc(window_handle_, message, wparam, lparam);