mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-19 22:54:50 -04:00
fix resize window
Change-Id: Iff851ceda75cbbcf683684f2ecccd043f85d30b7
This commit is contained in:
@@ -160,6 +160,16 @@ void AceAbility::OnStart(const Want& want)
|
||||
return aceView->DispatchTouchEvent(aceView, event);
|
||||
};
|
||||
window->RegistOnTouchCb(touchEventCallback);
|
||||
// register surface change callback
|
||||
auto&& surfaceChangedCallBack = [flutterAceView](OHOS::WindowInfo& info) {
|
||||
LOGD("RegistWindowInfoChangeCb surfaceChangedCallBack called");
|
||||
flutter::ViewportMetrics metrics;
|
||||
metrics.physical_width = info.width;
|
||||
metrics.physical_height = info.height;
|
||||
Platform::FlutterAceView::SetViewportMetrics(flutterAceView, metrics);
|
||||
Platform::FlutterAceView::SurfaceChanged(flutterAceView, info.width, info.height, 0);
|
||||
};
|
||||
window->RegistWindowInfoChangeCb(surfaceChangedCallBack);
|
||||
|
||||
Platform::FlutterAceView::SurfaceCreated(flutterAceView, window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user