!10911 编码问题整改 wupengbo

Merge pull request !10911 from lpf/wupengbo2
This commit is contained in:
openharmony_ci 2024-11-21 08:18:39 +00:00 committed by Gitee
commit 95815f5405
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
12 changed files with 41 additions and 50 deletions

View File

@ -1066,8 +1066,8 @@ struct VsyncCallback {
}; };
struct WindowLimits { struct WindowLimits {
uint32_t maxWidth_ = INT32_MAX; uint32_t maxWidth_ = UINT32_MAX;
uint32_t maxHeight_ = INT32_MAX; uint32_t maxHeight_ = UINT32_MAX;
uint32_t minWidth_ = 1; uint32_t minWidth_ = 1;
uint32_t minHeight_ = 1; uint32_t minHeight_ = 1;
float maxRatio_ = FLT_MAX; float maxRatio_ = FLT_MAX;

View File

@ -823,7 +823,7 @@ napi_value JsWindow::KeepKeyboardOnFocus(napi_env env, napi_callback_info info)
napi_value JsWindow::EnableDrag(napi_env env, napi_callback_info info) napi_value JsWindow::EnableDrag(napi_env env, napi_callback_info info)
{ {
TLOGD(WmsLogTag::WMS_LAYOUT, "[NAPI] EnableDrag"); TLOGD(WmsLogTag::WMS_LAYOUT, "[NAPI]");
JsWindow* me = CheckParamsAndGetThis<JsWindow>(env, info); JsWindow* me = CheckParamsAndGetThis<JsWindow>(env, info);
return (me != nullptr) ? me->OnEnableDrag(env, info) : nullptr; return (me != nullptr) ? me->OnEnableDrag(env, info) : nullptr;
} }
@ -958,7 +958,7 @@ napi_value JsWindow::RequestFocus(napi_env env, napi_callback_info info)
napi_value JsWindow::StartMoving(napi_env env, napi_callback_info info) napi_value JsWindow::StartMoving(napi_env env, napi_callback_info info)
{ {
TLOGD(WmsLogTag::WMS_IMMS, "[NAPI]StartMoving"); TLOGD(WmsLogTag::WMS_IMMS, "[NAPI]");
JsWindow* me = CheckParamsAndGetThis<JsWindow>(env, info); JsWindow* me = CheckParamsAndGetThis<JsWindow>(env, info);
return (me != nullptr) ? me->OnStartMoving(env, info) : nullptr; return (me != nullptr) ? me->OnStartMoving(env, info) : nullptr;
} }
@ -2281,7 +2281,7 @@ napi_value JsWindow::OnSetDialogBackGestureEnabled(napi_env env, napi_callback_i
wptr<Window> weakToken(windowToken_); wptr<Window> weakToken(windowToken_);
std::shared_ptr<WmErrorCode> errCodePtr = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK); std::shared_ptr<WmErrorCode> errCodePtr = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK);
NapiAsyncTask::ExecuteCallback execute = [weakToken, isEnabled, errCodePtr]() { NapiAsyncTask::ExecuteCallback execute = [weakToken, isEnabled, errCodePtr] {
if (errCodePtr == nullptr) { if (errCodePtr == nullptr) {
return; return;
} }
@ -2996,7 +2996,7 @@ napi_value JsWindow::OnSetSystemBarProperties(napi_env env, napi_callback_info i
{ {
WMError errCode = WMError::WM_OK; WMError errCode = WMError::WM_OK;
if (windowToken_ == nullptr) { if (windowToken_ == nullptr) {
TLOGE(WmsLogTag::WMS_IMMS, "windowToken_ is nullptr"); TLOGE(WmsLogTag::WMS_IMMS, "windowToken is nullptr");
errCode = WMError::WM_ERROR_NULLPTR; errCode = WMError::WM_ERROR_NULLPTR;
} }
size_t argc = 4; size_t argc = 4;
@ -3791,7 +3791,7 @@ napi_value JsWindow::OnSetTopmost(napi_env env, napi_callback_info info)
wptr<Window> weakToken(windowToken_); wptr<Window> weakToken(windowToken_);
std::shared_ptr<WmErrorCode> errCodePtr = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK); std::shared_ptr<WmErrorCode> errCodePtr = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK);
NapiAsyncTask::ExecuteCallback execute = [weakToken, topmost, errCodePtr]() { NapiAsyncTask::ExecuteCallback execute = [weakToken, topmost, errCodePtr] {
if (errCodePtr == nullptr) { if (errCodePtr == nullptr) {
return; return;
} }
@ -3954,7 +3954,7 @@ napi_value JsWindow::OnSetWindowKeepScreenOn(napi_env env, napi_callback_info in
} }
wptr<Window> weakToken(windowToken_); wptr<Window> weakToken(windowToken_);
std::shared_ptr<WmErrorCode> errCodePtr = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK); std::shared_ptr<WmErrorCode> errCodePtr = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK);
NapiAsyncTask::ExecuteCallback execute = [weakToken, keepScreenOn, errCodePtr] () { NapiAsyncTask::ExecuteCallback execute = [weakToken, keepScreenOn, errCodePtr] {
if (errCodePtr == nullptr) { if (errCodePtr == nullptr) {
return; return;
} }
@ -5751,7 +5751,7 @@ napi_value JsWindow::OnSetHandwritingFlag(napi_env env, napi_callback_info info)
napi_get_value_bool(env, nativeBool, &isAddFlag); napi_get_value_bool(env, nativeBool, &isAddFlag);
wptr<Window> weakToken(windowToken_); wptr<Window> weakToken(windowToken_);
std::shared_ptr<WmErrorCode> errCodePtr = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK); std::shared_ptr<WmErrorCode> errCodePtr = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK);
NapiAsyncTask::ExecuteCallback execute = [weakToken, isAddFlag, errCodePtr]() { NapiAsyncTask::ExecuteCallback execute = [weakToken, isAddFlag, errCodePtr] {
if (errCodePtr == nullptr) { if (errCodePtr == nullptr) {
return; return;
} }
@ -6124,10 +6124,10 @@ napi_value JsWindow::OnEnableDrag(napi_env env, napi_callback_info info)
} }
NapiAsyncTask::ExecuteCallback JsWindow::GetEnableDragExecuteCallback(bool enableDrag, const wptr<Window>& weakToken, NapiAsyncTask::ExecuteCallback JsWindow::GetEnableDragExecuteCallback(bool enableDrag, const wptr<Window>& weakToken,
std::shared_ptr<WmErrorCode> &errCodePtr) const std::shared_ptr<WmErrorCode>& errCodePtr) const
{ {
NapiAsyncTask::ExecuteCallback execute = NapiAsyncTask::ExecuteCallback execute =
[weakToken, enableDrag, errCodePtr]() { [weakToken, enableDrag, errCodePtr] {
if (errCodePtr == nullptr) { if (errCodePtr == nullptr) {
return; return;
} }
@ -6169,16 +6169,12 @@ napi_value JsWindow::OnSetWindowLimits(napi_env env, napi_callback_info info)
size_t argc = 4; size_t argc = 4;
napi_value argv[4] = {nullptr}; napi_value argv[4] = {nullptr};
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
if (argc < 1) { if (argc < 1 || argv[0] == nullptr) {
WLOGFE("Argc is invalid: %{public}zu", argc); WLOGFE("Argc is invalid: %{public}zu", argc);
return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM);
} }
napi_value nativeObj = argv[0];
if (nativeObj == nullptr) {
return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM);
}
WindowLimits windowLimits; WindowLimits windowLimits;
if (!ParseWindowLimits(env, nativeObj, windowLimits)) { if (!ParseWindowLimits(env, argv[0], windowLimits)) {
WLOGFE("Failed to convert object to windowLimits"); WLOGFE("Failed to convert object to windowLimits");
return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM);
} }
@ -6253,7 +6249,7 @@ napi_value JsWindow::OnSetWindowDecorVisible(napi_env env, napi_callback_info in
size_t argc = 4; size_t argc = 4;
napi_value argv[4] = {nullptr}; napi_value argv[4] = {nullptr};
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
if (argc < 1) { if (argc < 1 || argv[0] == nullptr) {
WLOGFE("Argc is invalid: %{public}zu", argc); WLOGFE("Argc is invalid: %{public}zu", argc);
return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM);
} }
@ -6261,15 +6257,10 @@ napi_value JsWindow::OnSetWindowDecorVisible(napi_env env, napi_callback_info in
WLOGFE("WindowToken_ is nullptr"); WLOGFE("WindowToken_ is nullptr");
return NapiThrowError(env, WmErrorCode::WM_ERROR_STATE_ABNORMALLY); return NapiThrowError(env, WmErrorCode::WM_ERROR_STATE_ABNORMALLY);
} }
napi_value nativeVal = argv[0];
if (nativeVal == nullptr) {
WLOGFE("Failed to convert parameter to visible");
return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM);
}
bool isVisible = true; bool isVisible = true;
WmErrorCode errCode = WmErrorCode::WM_OK; WmErrorCode errCode = WmErrorCode::WM_OK;
CHECK_NAPI_RETCODE(errCode, WmErrorCode::WM_ERROR_INVALID_PARAM, CHECK_NAPI_RETCODE(errCode, WmErrorCode::WM_ERROR_INVALID_PARAM,
napi_get_value_bool(env, nativeVal, &isVisible)); napi_get_value_bool(env, argv[0], &isVisible));
if (errCode == WmErrorCode::WM_ERROR_INVALID_PARAM) { if (errCode == WmErrorCode::WM_ERROR_INVALID_PARAM) {
return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM);
} }
@ -6670,7 +6661,7 @@ void SetWindowGrayScaleTask(const wptr<Window>& weakToken, double grayScale,
NapiAsyncTask::ExecuteCallback& execute, NapiAsyncTask::CompleteCallback& complete) NapiAsyncTask::ExecuteCallback& execute, NapiAsyncTask::CompleteCallback& complete)
{ {
std::shared_ptr<WmErrorCode> err = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK); std::shared_ptr<WmErrorCode> err = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK);
execute = [weakToken, grayScale, err]() { execute = [weakToken, grayScale, err] {
if (err == nullptr) { if (err == nullptr) {
TLOGE(WmsLogTag::DEFAULT, "wm error code is null"); TLOGE(WmsLogTag::DEFAULT, "wm error code is null");
return; return;
@ -6906,7 +6897,7 @@ napi_value JsWindow::OnStartMoving(napi_env env, napi_callback_info info)
} }
wptr<Window> weakToken(windowToken_); wptr<Window> weakToken(windowToken_);
std::shared_ptr<WmErrorCode> err = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK); std::shared_ptr<WmErrorCode> err = std::make_shared<WmErrorCode>(WmErrorCode::WM_OK);
NapiAsyncTask::ExecuteCallback execute = [this, weakToken, err] () { NapiAsyncTask::ExecuteCallback execute = [this, weakToken, err] {
if (err == nullptr) { if (err == nullptr) {
TLOGE(WmsLogTag::WMS_SYSTEM, "wm error code is null."); TLOGE(WmsLogTag::WMS_SYSTEM, "wm error code is null.");
return; return;

View File

@ -338,7 +338,7 @@ private:
std::shared_ptr<NativeReference> jsTransControllerObj_ = nullptr; std::shared_ptr<NativeReference> jsTransControllerObj_ = nullptr;
NapiAsyncTask::ExecuteCallback GetEnableDragExecuteCallback(bool enableDrag, const wptr<Window>& weakToken, NapiAsyncTask::ExecuteCallback GetEnableDragExecuteCallback(bool enableDrag, const wptr<Window>& weakToken,
std::shared_ptr<WmErrorCode> &errCodePtr) const; std::shared_ptr<WmErrorCode>& errCodePtr) const;
NapiAsyncTask::CompleteCallback GetEnableDragCompleteCallback(const std::shared_ptr<WmErrorCode>& errCodePtr) const; NapiAsyncTask::CompleteCallback GetEnableDragCompleteCallback(const std::shared_ptr<WmErrorCode>& errCodePtr) const;
}; };
} // namespace Rosen } // namespace Rosen

View File

@ -316,9 +316,9 @@ public:
virtual WmErrorCode KeepKeyboardOnFocus(bool keepKeyboardFlag) = 0; virtual WmErrorCode KeepKeyboardOnFocus(bool keepKeyboardFlag) = 0;
virtual WMError RegisterWindowVisibilityChangeListener(const WindowVisibilityListenerSptr& listener) = 0; virtual WMError RegisterWindowVisibilityChangeListener(const WindowVisibilityListenerSptr& listener) = 0;
virtual WMError UnregisterWindowVisibilityChangeListener(const WindowVisibilityListenerSptr& listener) = 0; virtual WMError UnregisterWindowVisibilityChangeListener(const WindowVisibilityListenerSptr& listener) = 0;
virtual WMError SetWindowLimits(WindowLimits& windowLimits) { return WMError::WM_OK; }; virtual WMError SetWindowLimits(WindowLimits& windowLimits) { return WMError::WM_OK; }
virtual WMError GetWindowLimits(WindowLimits& windowLimits) { return WMError::WM_OK; }; virtual WMError GetWindowLimits(WindowLimits& windowLimits) { return WMError::WM_OK; }
virtual WMError EnableDrag(bool enableDrag) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; }; virtual WMError EnableDrag(bool enableDrag) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; }
virtual WMError RegisterWindowNoInteractionListener(const IWindowNoInteractionListenerSptr& listener) virtual WMError RegisterWindowNoInteractionListener(const IWindowNoInteractionListenerSptr& listener)
{ {
return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; return WMError::WM_ERROR_DEVICE_NOT_SUPPORT;
@ -379,7 +379,7 @@ public:
{ {
return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; return WMError::WM_ERROR_DEVICE_NOT_SUPPORT;
} }
virtual WMError Recover(uint32_t reason = 0) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; }; virtual WMError Recover(uint32_t reason = 0) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; }
virtual WMError Maximize(MaximizePresentation present) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } virtual WMError Maximize(MaximizePresentation present) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; }

View File

@ -662,8 +662,8 @@ enum class WindowUpdateType : int32_t {
}; };
struct WindowLimits { struct WindowLimits {
uint32_t maxWidth_ = INT32_MAX; uint32_t maxWidth_ = UINT32_MAX;
uint32_t maxHeight_ = INT32_MAX; uint32_t maxHeight_ = UINT32_MAX;
uint32_t minWidth_ = 1; uint32_t minWidth_ = 1;
uint32_t minHeight_ = 1; uint32_t minHeight_ = 1;
float maxRatio_ = FLT_MAX; float maxRatio_ = FLT_MAX;

View File

@ -50,8 +50,8 @@ public:
/** /**
* @brief Receive session event from application. * @brief Receive session event from application.
* *
* This function provides the ability for applications to move window.\n * This function provides the ability for applications to move window.
* This interface will take effect after touch down event.\n * This interface will take effect after touch down event.
* *
* @param event Indicates the {@link SessionEvent} * @param event Indicates the {@link SessionEvent}
* @return Returns WSError::WS_OK if called success, otherwise failed. * @return Returns WSError::WS_OK if called success, otherwise failed.
@ -214,8 +214,8 @@ public:
* @brief Update the required params to system. * @brief Update the required params to system.
* *
* Update the required rect and reason to determine the final size of pip window. Called when start pip, * Update the required rect and reason to determine the final size of pip window. Called when start pip,
* show pip window, update pip size and pip restore.\n * show pip window, update pip size and pip restore.
* Make sure the caller's process is same with the process which created pip window.\n * Make sure the caller's process is same with the process which created pip window.
* *
* @param rect Indicates the {@link Rect} structure containing required size and position. * @param rect Indicates the {@link Rect} structure containing required size and position.
* @param reason Indicates the {@link SizeChangeReason} reason. * @param reason Indicates the {@link SizeChangeReason} reason.
@ -226,8 +226,8 @@ public:
/** /**
* @brief Update the pip control status to pip control panel. * @brief Update the pip control status to pip control panel.
* *
* Called when the specified component's status needs to be updated.\n * Called when the specified component's status needs to be updated.
* Make sure the caller's process is same with the process which created pip window.\n * Make sure the caller's process is same with the process which created pip window.
* *
* @param controlType Indicates the {@link WsPiPControlType} component in pip control panel. * @param controlType Indicates the {@link WsPiPControlType} component in pip control panel.
* @param status Indicates the {@link WsPiPControlStatus} status of specified component. * @param status Indicates the {@link WsPiPControlStatus} status of specified component.

View File

@ -2291,8 +2291,8 @@ WSError SceneSession::TransferPointerEventInner(const std::shared_ptr<MMI::Point
TLOGD(WmsLogTag::WMS_LAYOUT, "moveDragController_ is null"); TLOGD(WmsLogTag::WMS_LAYOUT, "moveDragController_ is null");
return Session::TransferPointerEvent(pointerEvent, needNotifyClient); return Session::TransferPointerEvent(pointerEvent, needNotifyClient);
} }
if ((property->GetWindowMode() == WindowMode::WINDOW_MODE_FLOATING && property->GetDragEnabled()) if ((property->GetWindowMode() == WindowMode::WINDOW_MODE_FLOATING && property->GetDragEnabled()) ||
|| isDragEnabledSystemWindow) { isDragEnabledSystemWindow) {
if ((systemConfig_.IsPcWindow() || IsFreeMultiWindowMode() || if ((systemConfig_.IsPcWindow() || IsFreeMultiWindowMode() ||
(property->GetIsPcAppInPad() && !isMainWindow)) && (property->GetIsPcAppInPad() && !isMainWindow)) &&
moveDragController_->ConsumeDragEvent(pointerEvent, winRect_, property, systemConfig_)) { moveDragController_->ConsumeDragEvent(pointerEvent, winRect_, property, systemConfig_)) {

View File

@ -333,7 +333,7 @@ void SceneInputManager::FlushChangeInfoToMMI(const std::map<uint64_t, std::vecto
bool SceneInputManager::CheckNeedUpdate(const std::vector<MMI::DisplayInfo>& displayInfos, bool SceneInputManager::CheckNeedUpdate(const std::vector<MMI::DisplayInfo>& displayInfos,
const std::vector<MMI::WindowInfo>& windowInfoList) const std::vector<MMI::WindowInfo>& windowInfoList)
{ {
int32_t focusId = Rosen::SceneSessionManager::GetInstance().GetFocusedSessionId(); int32_t focusId = SceneSessionManager::GetInstance().GetFocusedSessionId();
if (focusId != lastFocusId_) { if (focusId != lastFocusId_) {
lastFocusId_ = focusId; lastFocusId_ = focusId;
lastDisplayInfos_ = displayInfos; lastDisplayInfos_ = displayInfos;
@ -380,7 +380,7 @@ void SceneInputManager::UpdateFocusedSessionId(int32_t focusedSessionId)
void DumpUIExtentionWindowInfo(const MMI::WindowInfo& windowInfo) void DumpUIExtentionWindowInfo(const MMI::WindowInfo& windowInfo)
{ {
auto sceneSession = Rosen::SceneSessionManager::GetInstance().GetSceneSession(windowInfo.id); auto sceneSession = SceneSessionManager::GetInstance().GetSceneSession(windowInfo.id);
if (sceneSession == nullptr) { if (sceneSession == nullptr) {
TLOGE(WmsLogTag::WMS_EVENT, "sceneSession is null"); TLOGE(WmsLogTag::WMS_EVENT, "sceneSession is null");
return; return;
@ -410,7 +410,7 @@ void SceneInputManager::PrintWindowInfo(const std::vector<MMI::WindowInfo>& wind
if (windowEventID == UINT32_MAX) { if (windowEventID == UINT32_MAX) {
windowEventID = 0; windowEventID = 0;
} }
focusedSessionId_ = Rosen::SceneSessionManager::GetInstance().GetFocusedSessionId(); focusedSessionId_ = SceneSessionManager::GetInstance().GetFocusedSessionId();
std::unordered_map<int32_t, MMI::Rect> currWindowDefaultHotArea; std::unordered_map<int32_t, MMI::Rect> currWindowDefaultHotArea;
static std::unordered_map<int32_t, MMI::Rect> lastWindowDefaultHotArea; static std::unordered_map<int32_t, MMI::Rect> lastWindowDefaultHotArea;
for (auto& e : windowInfoList) { for (auto& e : windowInfoList) {

View File

@ -144,7 +144,7 @@ void SceneSessionDirtyManager::CalTransform(const sptr<SceneSession>& sceneSessi
} }
transform = Matrix3f::IDENTITY; transform = Matrix3f::IDENTITY;
bool isRotate = sceneSession->GetSessionInfo().isRotable_; bool isRotate = sceneSession->GetSessionInfo().isRotable_;
auto displayMode = Rosen::ScreenSessionManagerClient::GetInstance().GetFoldDisplayMode(); auto displayMode = ScreenSessionManagerClient::GetInstance().GetFoldDisplayMode();
if (isRotate || !sceneSession->GetSessionInfo().isSystem_ || if (isRotate || !sceneSession->GetSessionInfo().isSystem_ ||
static_cast<MMI::DisplayMode>(displayMode) == MMI::DisplayMode::FULL || static_cast<MMI::DisplayMode>(displayMode) == MMI::DisplayMode::FULL ||
(static_cast<MMI::DisplayMode>(displayMode) == MMI::DisplayMode::MAIN && (static_cast<MMI::DisplayMode>(displayMode) == MMI::DisplayMode::MAIN &&
@ -366,7 +366,7 @@ bool SceneSessionDirtyManager::IsFilterSession(const sptr<SceneSession>& sceneSe
} else if (sceneSession->IsSystemSession() && sceneSession->IsVisible() && sceneSession->IsSystemActive()) { } else if (sceneSession->IsSystemSession() && sceneSession->IsVisible() && sceneSession->IsSystemActive()) {
return false; return false;
} }
if (!Rosen::SceneSessionManager::GetInstance().IsSessionVisible(sceneSession)) { if (!SceneSessionManager::GetInstance().IsSessionVisible(sceneSession)) {
return true; return true;
} }
return false; return false;
@ -453,7 +453,7 @@ std::pair<std::vector<MMI::WindowInfo>, std::vector<std::shared_ptr<Media::Pixel
{ {
std::vector<MMI::WindowInfo> windowInfoList; std::vector<MMI::WindowInfo> windowInfoList;
std::vector<std::shared_ptr<Media::PixelMap>> pixelMapList; std::vector<std::shared_ptr<Media::PixelMap>> pixelMapList;
const auto sceneSessionMap = Rosen::SceneSessionManager::GetInstance().GetSceneSessionMap(); const auto sceneSessionMap = SceneSessionManager::GetInstance().GetSceneSessionMap();
// all input event should trans to dialog window if dialog exists // all input event should trans to dialog window if dialog exists
const auto dialogMap = GetDialogSessionMap(sceneSessionMap); const auto dialogMap = GetDialogSessionMap(sceneSessionMap);
uint32_t maxHotAreasNum = 0; uint32_t maxHotAreasNum = 0;

View File

@ -1113,7 +1113,7 @@ HWTEST_F(SceneSessionTest, TransferPointerEvent, Function | SmallTest | Level2)
EXPECT_NE(sceneSession, nullptr); EXPECT_NE(sceneSession, nullptr);
std::shared_ptr<MMI::PointerEvent> pointerEvent = nullptr; std::shared_ptr<MMI::PointerEvent> pointerEvent = nullptr;
ASSERT_EQ(sceneSession->TransferPointerEvent(pointerEvent), WSError::WS_ERROR_NULLPTR); ASSERT_EQ(sceneSession->TransferPointerEvent(pointerEvent), WSError::WS_ERROR_NULLPTR);
std::shared_ptr<MMI::PointerEvent> pointerEvent_ = MMI::PointerEvent::Create(); std::shared_ptr<MMI::PointerEvent> pointerEvent_ = MMI::PointerEvent::Create();
sptr<WindowSessionProperty> property = new WindowSessionProperty(); sptr<WindowSessionProperty> property = new WindowSessionProperty();
property->SetWindowMode(WindowMode::WINDOW_MODE_FLOATING); property->SetWindowMode(WindowMode::WINDOW_MODE_FLOATING);
property->SetMaximizeMode(MaximizeMode::MODE_FULL_FILL); property->SetMaximizeMode(MaximizeMode::MODE_FULL_FILL);

View File

@ -159,7 +159,7 @@ HWTEST_F(SystemSessionTest, NotifyClientToUpdateRect01, Function | SmallTest | L
*/ */
HWTEST_F(SystemSessionTest, CheckPointerEventDispatch, Function | SmallTest | Level1) HWTEST_F(SystemSessionTest, CheckPointerEventDispatch, Function | SmallTest | Level1)
{ {
std::shared_ptr<MMI::PointerEvent> pointerEvent_ = MMI::PointerEvent::Create(); std::shared_ptr<MMI::PointerEvent> pointerEvent_ = MMI::PointerEvent::Create();
SessionInfo info; SessionInfo info;
info.abilityName_ = "CheckPointerEventDispatch"; info.abilityName_ = "CheckPointerEventDispatch";
info.bundleName_ = "CheckPointerEventDispatchBundleName"; info.bundleName_ = "CheckPointerEventDispatchBundleName";

View File

@ -752,7 +752,7 @@ bool WindowSceneSessionImpl::HandlePointDownEvent(const std::shared_ptr<MMI::Poi
TLOGD(WmsLogTag::WMS_EVENT, "isFixedSystemWin %{public}d, isFixedSubWin %{public}d, isDecorDialog %{public}d", TLOGD(WmsLogTag::WMS_EVENT, "isFixedSystemWin %{public}d, isFixedSubWin %{public}d, isDecorDialog %{public}d",
isFixedSystemWin, isFixedSubWin, isDecorDialog); isFixedSystemWin, isFixedSubWin, isDecorDialog);
if ((isFixedSystemWin || isFixedSubWin) && !isDecorDialog) { if ((isFixedSystemWin || isFixedSubWin) && !isDecorDialog) {
if (!isFixedSubWin && !(windowType == WindowType::WINDOW_TYPE_DIALOG)) { if (!isFixedSubWin && windowType != WindowType::WINDOW_TYPE_DIALOG) {
hostSession->SendPointEventForMoveDrag(pointerEvent); hostSession->SendPointEventForMoveDrag(pointerEvent);
} else { } else {
hostSession->ProcessPointDownSession(pointerItem.GetDisplayX(), pointerItem.GetDisplayY()); hostSession->ProcessPointDownSession(pointerItem.GetDisplayX(), pointerItem.GetDisplayY());