From Stephan Huber, "* osgGA: fixed a small bug regarding emulating mouse-events from touch-events

* resthttp/osc: encapsulate RequestHandler-classes in their own namespaces to prevent class-name-lookup-errors in the debugger/code (had some weird crashes)
* QTKit: fixed a compile-bug for gcc and blocks
* osgPresentation: click_to_* will fire on RELEASE, only if the drawable received a PUSH beforehand
* p3d/osgPresentation: implemented "forward_mouse_event_to_device"-tag, which will forward mouse-events to all registered devices of a viewer, if an intersection occurs. The mouse-coordinates get reprojected
* present3d: all devices get registered with the viewer
* osgViewer: only devices which are capable of receiving events are queried for new events.
* GraphicWindowIOS: added a flag to GraphicWindowIOS::WindowData to set up a retained backing buffer (defaults to false) This will enable read-back of the render-buffer with glReadPixels even after the renderbuffer got presented
* curl: added an optimized check for file-existance, now only the headers are requested and checked, instead of reading the whole file and handle it with a ReaderWriter
* p3d: fixed a bug, where the existence of a local file may prevent the remote loading of a file with the same name.

"
This commit is contained in:
Robert Osfield
2013-01-07 12:17:26 +00:00
parent 521625b343
commit e76e3a7b1b
17 changed files with 174 additions and 73 deletions

View File

@@ -409,7 +409,7 @@ GUIEventAdapter* EventQueue::touchBegan(unsigned int id, GUIEventAdapter::Touch
{
// emulate left mouse button press
_accumulateEventState->setButtonMask((1) | _accumulateEventState->getButtonMask());
_accumulateEventState->setButtonMask(GUIEventAdapter::LEFT_MOUSE_BUTTON | _accumulateEventState->getButtonMask());
_accumulateEventState->setX(x);
_accumulateEventState->setY(y);
}
@@ -418,7 +418,9 @@ GUIEventAdapter* EventQueue::touchBegan(unsigned int id, GUIEventAdapter::Touch
event->setEventType(GUIEventAdapter::PUSH);
event->setTime(time);
event->addTouchPoint(id, phase, x, y, 0);
if(_firstTouchEmulatesMouse)
event->setButton(GUIEventAdapter::LEFT_MOUSE_BUTTON);
addEvent(event);
return event;
@@ -446,7 +448,7 @@ GUIEventAdapter* EventQueue::touchEnded(unsigned int id, GUIEventAdapter::Touch
{
if (_firstTouchEmulatesMouse)
{
_accumulateEventState->setButtonMask(~(1) & _accumulateEventState->getButtonMask());
_accumulateEventState->setButtonMask(~GUIEventAdapter::LEFT_MOUSE_BUTTON & _accumulateEventState->getButtonMask());
_accumulateEventState->setX(x);
_accumulateEventState->setY(y);
}
@@ -455,6 +457,9 @@ GUIEventAdapter* EventQueue::touchEnded(unsigned int id, GUIEventAdapter::Touch
event->setEventType(GUIEventAdapter::RELEASE);
event->setTime(time);
event->addTouchPoint(id, phase, x, y, tap_count);
if(_firstTouchEmulatesMouse)
event->setButton(GUIEventAdapter::LEFT_MOUSE_BUTTON);
addEvent(event);
return event;