Support handler_

Signed-off-by: wulehui<wulehui@huawei.com>
This commit is contained in:
w00574628 2024-11-21 21:45:33 +08:00
parent 750556dc70
commit 1f157eb2be
3 changed files with 8 additions and 2 deletions

View File

@ -544,6 +544,7 @@ public:
void ResetDragDirtyFlags();
void SetClientDragEnable(bool dragEnable);
std::optional<bool> GetClientDragEnable() const;
std::shared_ptr<AppExecFwk::EventHandler> GetEventHandler() const;
protected:
class SessionLifeCycleTask : public virtual RefBase {

View File

@ -547,7 +547,7 @@ void KeyboardSession::OpenKeyboardSyncTransaction()
session->isKeyboardSyncTransactionOpen_ = true;
auto transactionController = RSSyncTransactionController::GetInstance();
if (transactionController) {
transactionController->OpenSyncTransaction();
transactionController->OpenSyncTransaction(session->GetEventHandler());
}
return WSError::WS_OK;
};
@ -588,7 +588,7 @@ void KeyboardSession::CloseKeyboardSyncTransaction(const WSRect& keyboardPanelRe
session->isKeyboardSyncTransactionOpen_ = false;
auto transactionController = RSSyncTransactionController::GetInstance();
if (transactionController) {
transactionController->CloseSyncTransaction();
transactionController->CloseSyncTransaction(session->GetEventHandler());
}
return WSError::WS_OK;
};

View File

@ -3659,4 +3659,9 @@ bool Session::IsVisible() const
{
return isVisible_;
}
std::shared_ptr<AppExecFwk::EventHandler> Session::GetEventHandler() const
{
return handler_;
}
} // namespace OHOS::Rosen