Browse Source

Fixed a problem where modal loops could stop a mouse-up event.

tags/2021-05-28
jules 12 years ago
parent
commit
e9d160b545
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp

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

@@ -166,6 +166,9 @@ public:
buttonState = newButtonState; // must change this before calling sendMouseUp, in case it runs a modal loop buttonState = newButtonState; // must change this before calling sendMouseUp, in case it runs a modal loop
sendMouseUp (current, screenPos + unboundedMouseOffset, time, oldMods); sendMouseUp (current, screenPos + unboundedMouseOffset, time, oldMods);
if (lastCounter != mouseEventCounter)
return true; // if a modal loop happened, then newButtonState is no longer valid.
} }
enableUnboundedMouseMovement (false, false); enableUnboundedMouseMovement (false, false);


Loading…
Cancel
Save