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:
Timothy Nikkel 2020-05-30 06:58:47 +00:00
Родитель c562e03d91
Коммит 0a375e5a95
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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,