Skip to content

Commit

Permalink
Fix ridicolous deltas being processed by capturing mousetools in OSX.
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Feb 15, 2017
1 parent 576c2fe commit 5ecc69a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libs/wxutil/MouseToolHandler.cpp
Expand Up @@ -103,6 +103,16 @@ void MouseToolHandler::onGLMouseButtonPress(wxMouseEvent& ev)

void MouseToolHandler::onGLMouseMove(wxMouseEvent& ev)
{
// Skip this event if any of the active mouse tools is in capture mode
// the call here still arrives on OSX even during capture
for (const ActiveMouseTools::value_type& pair : _activeMouseTools)
{
if (pair.second->getPointerMode() & ui::MouseTool::PointerMode::Capture)
{
return; // skip
}
}

Vector2 position(ev.GetX(), ev.GetY());

sendMoveEventToInactiveTools(ev.GetX(), ev.GetY());
Expand Down

0 comments on commit 5ecc69a

Please sign in to comment.