Browse Source

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

tags/2021-05-28
ed 7 years ago
parent
commit
b3a09e8e96
1 changed files with 2 additions and 10 deletions
  1. +2
    -10
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 2
- 10
modules/juce_gui_basics/native/juce_win32_Windowing.cpp 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);


Loading…
Cancel
Save