mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-27 00:51:35 +00:00
!10916 修复:startMoving 接口相关判断
Merge pull request !10916 from tanchenghao/moveFix
This commit is contained in:
commit
2d2cd0ad3f
@ -2327,8 +2327,10 @@ WSError SceneSession::TransferPointerEventInner(const std::shared_ptr<MMI::Point
|
||||
return WSError::WS_OK;
|
||||
}
|
||||
}
|
||||
if ((IsDecorEnable() || isMovableSystemWindow) && moveDragController_->
|
||||
ConsumeMoveEvent(pointerEvent, winRect_)) {
|
||||
if ((WindowHelper::IsMainWindow(windowType) ||
|
||||
WindowHelper::IsSubWindow(windowType) ||
|
||||
WindowHelper::IsSystemWindow(windowType)) &&
|
||||
moveDragController_->ConsumeMoveEvent(pointerEvent, winRect_)) {
|
||||
PresentFoucusIfNeed(pointerEvent->GetPointerAction());
|
||||
pointerEvent->MarkProcessed();
|
||||
return WSError::WS_OK;
|
||||
|
@ -350,6 +350,10 @@ HWTEST_F(SceneSessionTest5, TransferPointerEvent01, Function | SmallTest | Level
|
||||
pointerEvent->SetPointerAction(2);
|
||||
EXPECT_EQ(WSError::WS_OK, session->TransferPointerEvent(pointerEvent, false));
|
||||
|
||||
session->property_->SetWindowType(WindowType::APP_SUB_WINDOW_BASE);
|
||||
session->property_->SetDecorEnable(false);
|
||||
EXPECT_EQ(WSError::WS_OK, session->TransferPointerEvent(pointerEvent, false));
|
||||
|
||||
pointerEvent->SetPointerAction(5);
|
||||
session->property_->SetDragEnabled(true);
|
||||
systemConfig.windowUIType_ = WindowUIType::PHONE_WINDOW;
|
||||
|
@ -752,11 +752,7 @@ bool WindowSceneSessionImpl::HandlePointDownEvent(const std::shared_ptr<MMI::Poi
|
||||
TLOGD(WmsLogTag::WMS_EVENT, "isFixedSystemWin %{public}d, isFixedSubWin %{public}d, isDecorDialog %{public}d",
|
||||
isFixedSystemWin, isFixedSubWin, isDecorDialog);
|
||||
if ((isFixedSystemWin || isFixedSubWin) && !isDecorDialog) {
|
||||
if (!isFixedSubWin && windowType != WindowType::WINDOW_TYPE_DIALOG) {
|
||||
hostSession->SendPointEventForMoveDrag(pointerEvent);
|
||||
} else {
|
||||
hostSession->ProcessPointDownSession(pointerItem.GetDisplayX(), pointerItem.GetDisplayY());
|
||||
}
|
||||
hostSession->SendPointEventForMoveDrag(pointerEvent);
|
||||
} else {
|
||||
if (dragType != AreaType::UNDEFINED) {
|
||||
hostSession->SendPointEventForMoveDrag(pointerEvent);
|
||||
|
@ -328,6 +328,14 @@ HWTEST_F(WindowSceneSessionImplTest4, HandlePointDownEvent, Function | SmallTest
|
||||
pointerItem.SetWindowX(1);
|
||||
ret = windowSceneSessionImpl->HandlePointDownEvent(pointerEvent, pointerItem, sourceType, vpr, rect);
|
||||
EXPECT_EQ(true, ret);
|
||||
|
||||
windowSceneSessionImpl->property_->SetDragEnabled(true);
|
||||
ret = windowSceneSessionImpl->HandlePointDownEvent(pointerEvent, pointerItem, sourceType, vpr, rect);
|
||||
EXPECT_EQ(false, ret);
|
||||
|
||||
pointerItem.SetWindowX(100);
|
||||
ret = windowSceneSessionImpl->HandlePointDownEvent(pointerEvent, pointerItem, sourceType, vpr, rect);
|
||||
EXPECT_EQ(true, ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user