Bug 1249280 - Fix synthesized touch injection code on Windows to not apply the scale factor twice. r?jimm draft
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 19 Feb 2016 15:19:47 -0500
changeset 332173 4f71c3a1174e3e274902fbacb21b4e7a9f37fb2e
parent 332172 67e531d03996292d0d5799261f887451f6806e3a
child 332174 e475dd435740a5d887c4753978e9f9778f3c0e83
push id11183
push userkgupta@mozilla.com
push dateFri, 19 Feb 2016 20:20:03 +0000
reviewersjimm
bugs1249280
milestone47.0a1
Bug 1249280 - Fix synthesized touch injection code on Windows to not apply the scale factor twice. r?jimm MozReview-Commit-ID: 4SKIMLKeZOd
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());