зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1641996. Put the focus point of pinch events from Direct Manipulation in widget relative coordinates. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77576
This commit is contained in:
Родитель
c562e03d91
Коммит
0a375e5a95
|
@ -383,6 +383,8 @@ void DManipEventHandler::SendPinch(Phase aPhase, float aScale) {
|
|||
|
||||
POINT cursor_pos;
|
||||
::GetCursorPos(&cursor_pos);
|
||||
HWND wnd = static_cast<HWND>(mWindow ? mWindow->GetNativeData(NS_NATIVE_WINDOW));
|
||||
::ScreenToClient(wnd, &cursor_pos);
|
||||
ScreenPoint position = {(float)cursor_pos.x, (float)cursor_pos.y};
|
||||
|
||||
PinchGestureInput event{
|
||||
|
@ -441,6 +443,8 @@ void DManipEventHandler::SendPan(Phase aPhase, float x, float y,
|
|||
|
||||
POINT cursor_pos;
|
||||
::GetCursorPos(&cursor_pos);
|
||||
HWND wnd = static_cast<HWND>(mWindow ? mWindow->GetNativeData(NS_NATIVE_WINDOW));
|
||||
::ScreenToClient(wnd, &cursor_pos);
|
||||
ScreenPoint position = {(float)cursor_pos.x, (float)cursor_pos.y};
|
||||
|
||||
PanGestureInput event{panGestureType, eventIntervalTime, eventTimeStamp,
|
||||
|
|
Загрузка…
Ссылка в новой задаче