Bug 1585116 - Fix usage of the TOUCHINPUT WinAPI structure in nsWindow::OnTouch(). r=cmartin
authorBotond Ballo <botond@mozilla.com>
Thu, 03 Oct 2019 18:37:01 +0000
changeset 496222 98c607395faeb15d8b88ba46bb10ba43bb0c8dda
parent 496221 d2613eaa13690e3771e84ef6ff5080a8fa348a66
child 496223 8d5b29ee19f32494bc9c1ed1c134269cf3685f71
push id36647
push usernerli@mozilla.com
push dateFri, 04 Oct 2019 04:09:18 +0000
treeherdermozilla-central@678d4d2c3c4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscmartin
bugs1585116
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1585116 - Fix usage of the TOUCHINPUT WinAPI structure in nsWindow::OnTouch(). r=cmartin We were testing the dwFlags field against TOUCHINPUTMASKF_CONTACTAREA, when in fact that is meant to be tested against the dwMask field. Differential Revision: https://phabricator.services.mozilla.com/D47962
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6891,17 +6891,17 @@ bool nsWindow::OnTouch(WPARAM wParam, LP
       touchPoint.y = TOUCH_COORD_TO_PIXEL(pInputs[i].y);
       touchPoint.ScreenToClient(mWnd);
 
       // Initialize the touch data.
       SingleTouchData touchData(
           pInputs[i].dwID,                               // aIdentifier
           ScreenIntPoint::FromUnknownPoint(touchPoint),  // aScreenPoint
           /* radius, if known */
-          pInputs[i].dwFlags & TOUCHINPUTMASKF_CONTACTAREA
+          pInputs[i].dwMask & TOUCHINPUTMASKF_CONTACTAREA
               ? ScreenSize(TOUCH_COORD_TO_PIXEL(pInputs[i].cxContact) / 2,
                            TOUCH_COORD_TO_PIXEL(pInputs[i].cyContact) / 2)
               : ScreenSize(1, 1),  // aRadius
           0.0f,                    // aRotationAngle
           0.0f);                   // aForce
 
       // Append touch data to the appropriate event.
       if (addToEvent) {