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:
@@ -53,5 +53,12 @@ FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
|
||||
return *result;
|
||||
}
|
||||
}
|
||||
|
||||
switch (message) {
|
||||
case WM_FONTCHANGE:
|
||||
flutter_controller_->engine()->ReloadSystemFonts();
|
||||
break;
|
||||
}
|
||||
|
||||
return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
|
||||
}
|
||||
|
||||
@@ -187,11 +187,6 @@ Win32Window::MessageHandler(HWND hwnd,
|
||||
SetFocus(child_content_);
|
||||
}
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user