1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-15 00:24:19 +00:00

Windows: Use raw pixel location when forwarding touch events to fix an issue with non-DPI aware plug-ins

This commit is contained in:
ed 2018-11-23 12:46:22 +00:00
parent 68cac0c587
commit b3a09e8e96

View file

@ -2804,7 +2804,7 @@ private:
const auto orientation = touchInfo.touchMask & TOUCH_MASK_ORIENTATION ? degreesToRadians (static_cast<float> (touchInfo.orientation))
: MouseInputSource::invalidOrientation;
if (! handleTouchInput (emulateTouchEventFromPointer (lParam, wParam),
if (! handleTouchInput (emulateTouchEventFromPointer (touchInfo.pointerInfo.ptPixelLocationRaw, wParam),
isDown, isUp, pressure, orientation))
return false;
}
@ -2829,16 +2829,8 @@ private:
return true;
}
TOUCHINPUT emulateTouchEventFromPointer (LPARAM lParam, WPARAM wParam)
TOUCHINPUT emulateTouchEventFromPointer (POINT p, WPARAM wParam)
{
Point<int> p (GET_X_LPARAM (lParam),
GET_Y_LPARAM (lParam));
#if JUCE_WIN_PER_MONITOR_DPI_AWARE
if (! isPerMonitorDPIAwareThread())
p = Desktop::getInstance().getDisplays().physicalToLogical (p);
#endif
TOUCHINPUT touchInput;
touchInput.dwID = GET_POINTERID_WPARAM (wParam);