Bug 1249915 - Fix synthesized touch injection code on Windows to not apply the scale factor twice. r?jimm draft
authorKartikaya Gupta <kgupta@mozilla.com>
Sun, 21 Feb 2016 13:05:32 -0500
changeset 332792 01db5539bd1d2a211c0975ae41ec36f262bfe6a2
parent 332767 af6356a3e8c56036b74ba097395356d9c6e6c5a3
child 332793 92ad2d1107134622d2af44998b0751570895d24d
push id11237
push userkgupta@mozilla.com
push dateSun, 21 Feb 2016 18:06:13 +0000
reviewersjimm
bugs1249915
milestone47.0a1
Bug 1249915 - Fix synthesized touch injection code on Windows to not apply the scale factor twice. r?jimm MozReview-Commit-ID: Cdc7qG5m7dE
widget/windows/nsWindowBase.cpp
--- a/widget/windows/nsWindowBase.cpp
+++ b/widget/windows/nsWindowBase.cpp
@@ -85,18 +85,18 @@ nsWindowBase::InjectTouchPoint(uint32_t 
   info.touchFlags = TOUCH_FLAG_NONE;
   info.touchMask = TOUCH_MASK_CONTACTAREA|TOUCH_MASK_ORIENTATION|TOUCH_MASK_PRESSURE;
   info.pressure = aPressure;
   info.orientation = aOrientation;
   
   info.pointerInfo.pointerFlags = aFlags;
   info.pointerInfo.pointerType =  PT_TOUCH;
   info.pointerInfo.pointerId = aId;
-  info.pointerInfo.ptPixelLocation.x = LogToPhys(aPointerScreenPoint.x);
-  info.pointerInfo.ptPixelLocation.y = LogToPhys(aPointerScreenPoint.y);
+  info.pointerInfo.ptPixelLocation.x = aPointerScreenPoint.x;
+  info.pointerInfo.ptPixelLocation.y = aPointerScreenPoint.y;
 
   info.rcContact.top = info.pointerInfo.ptPixelLocation.y - 2;
   info.rcContact.bottom = info.pointerInfo.ptPixelLocation.y + 2;
   info.rcContact.left = info.pointerInfo.ptPixelLocation.x - 2;
   info.rcContact.right = info.pointerInfo.ptPixelLocation.x + 2;
   
   if (!sInjectTouchFuncPtr(1, &info)) {
     WinUtils::Log("InjectTouchInput failure. GetLastError=%d", GetLastError());