{}
bool handle( const osgGA::GUIEventAdapter& ea,
- osgGA::GUIActionAdapter& aa,
+ osgGA::GUIActionAdapter&,
osg::Object*,
osg::NodeVisitor* )
{
m.timeSinceLastMove.stamp();
FGMouseCursor::instance()->mouseMoved();
+ // TODO Get rid of this as soon as soon as cursor hide timeout works globally
+ if( ea->getHandled() )
+ return;
+
processMotion(x, y, ea);
m.x = x;
// Event handlers seem to be called even if the according event has already
// been handled. Already handled events shouldn't be handled multiple times
// so we need to exit here manually.
- if( ea.getHandled() )
+ if( ea.getHandled()
+ // Let mouse move events pass to correctly handle mouse cursor hide
+ // timeout while moving just on the canvas gui.
+ // TODO We should clean up the whole mouse input and make hide
+ // timeout independent of the event handler which consumed the
+ // event.
+ && ea.getEventType() != osgGA::GUIEventAdapter::MOVE
+ && ea.getEventType() != osgGA::GUIEventAdapter::DRAG )
return false;
int x = 0;