mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
fix wmtest wmclient27
Change-Id: I046ebbc4dd1a928efdee3b3333923a85320dc947 Signed-off-by: lizheng <lizheng2@huawei.com>
This commit is contained in:
parent
9f426bc69d
commit
e84049733b
@ -106,11 +106,13 @@ public:
|
|||||||
if (event.GetAction() == TouchEnum::PRIMARY_POINT_DOWN) {
|
if (event.GetAction() == TouchEnum::PRIMARY_POINT_DOWN) {
|
||||||
downX = x;
|
downX = x;
|
||||||
downY = y;
|
downY = y;
|
||||||
|
backupX = freeWindow->GetX();
|
||||||
|
backupY = freeWindow->GetY();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.GetAction() == TouchEnum::POINT_MOVE) {
|
if (event.GetAction() == TouchEnum::POINT_MOVE) {
|
||||||
freeWindow->Move(freeWindow->GetX() + x - downX, freeWindow->GetY() + y - downY)
|
freeWindow->Move(backupX + x - downX, backupY + y - downY)
|
||||||
->Then(std::bind(&WMClientNativeTest27::OnMoveReturn, this, std::placeholders::_1));
|
->Then(std::bind(&WMClientNativeTest27::OnMoveReturn, this, std::placeholders::_1));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -133,5 +135,7 @@ private:
|
|||||||
BufferRequestConfig config = {};
|
BufferRequestConfig config = {};
|
||||||
double downX = 0;
|
double downX = 0;
|
||||||
double downY = 0;
|
double downY = 0;
|
||||||
|
double backupX = 0;
|
||||||
|
double backupY = 0;
|
||||||
} g_autoload;
|
} g_autoload;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user