From 17fad079439565be4a02fef7718ea67cc76f7185 Mon Sep 17 00:00:00 2001 From: lee Date: Thu, 23 Feb 2023 15:19:27 +0800 Subject: [PATCH] handle idle event bugfix Signed-off-by: lee --- adapter/preview/entrance/ace_ability.cpp | 1 + adapter/preview/entrance/event_dispatcher.cpp | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/adapter/preview/entrance/ace_ability.cpp b/adapter/preview/entrance/ace_ability.cpp index 126da87ce1b..83d75a8cdb6 100644 --- a/adapter/preview/entrance/ace_ability.cpp +++ b/adapter/preview/entrance/ace_ability.cpp @@ -234,6 +234,7 @@ std::unique_ptr AceAbility::CreateInstance(AceRunArgs& runArgs) ctx->InitFrom(FlutterDesktopGetWindow(controller)); } + EventDispatcher::GetInstance().SetGlfwWindowController(controller); EventDispatcher::GetInstance().Initialize(); auto aceAbility = std::make_unique(runArgs); aceAbility->SetGlfwWindowController(ctx); diff --git a/adapter/preview/entrance/event_dispatcher.cpp b/adapter/preview/entrance/event_dispatcher.cpp index 0826a3bc20b..3271de1eccf 100644 --- a/adapter/preview/entrance/event_dispatcher.cpp +++ b/adapter/preview/entrance/event_dispatcher.cpp @@ -85,14 +85,10 @@ void EventDispatcher::Initialize() // Initial the proxy of Input method TextInputClientMgr::GetInstance().InitTextInputProxy(); // Register the idle event callback function. -#ifndef ENABLE_ROSEN_BACKEND IdleCallback idleNoticeCallback = [] (int64_t deadline) { EventDispatcher::GetInstance().DispatchIdleEvent(deadline); }; FlutterDesktopSetIdleCallback(controller_, idleNoticeCallback); -#else - // rosen process idle -#endif } void EventDispatcher::DispatchIdleEvent(int64_t deadline) -- Gitee