diff --git a/simgear/canvas/CanvasEventManager.cxx b/simgear/canvas/CanvasEventManager.cxx index a10b7c00..879f869c 100644 --- a/simgear/canvas/CanvasEventManager.cxx +++ b/simgear/canvas/CanvasEventManager.cxx @@ -279,8 +279,8 @@ namespace canvas const EventPropagationPath& path2 ) const { osg::Vec2 delta = path1.front().local_pos - path2.front().local_pos; - return delta.x() < drag_threshold - && delta.y() < drag_threshold; + return std::fabs(delta.x()) < drag_threshold + && std::fabs(delta.y()) < drag_threshold; } //----------------------------------------------------------------------------