Browse Source

Fixed bug where inertial mouse wheel events had screen position (0, 0)

tags/2021-05-28
ed 8 years ago
parent
commit
01aedca76d
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp

+ 2
- 0
modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp View File

@@ -345,6 +345,8 @@ public:
// scrollable components.
if (lastNonInertialWheelTarget == nullptr || ! wheel.isInertial)
lastNonInertialWheelTarget = getTargetForGesture (peer, positionWithinPeer, time, screenPos);
else
screenPos = peer.localToGlobal (positionWithinPeer);
if (Component* target = lastNonInertialWheelTarget)
sendMouseWheel (*target, screenPos, time, wheel);


Loading…
Cancel
Save