Commit 0a375e5a authored by Timothy Nikkel's avatar Timothy Nikkel
Browse files

Bug 1641996. Put the focus point of pinch events from Direct Manipulation in...

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
parent c562e03d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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,