Merge pull request #4679 from jherico/offscreen

Fix a couple of bugs with the new offscreen UI
This commit is contained in:
Brad Hefta-Gaub 2015-04-23 12:45:51 -07:00
commit ad7293d4ad
2 changed files with 11 additions and 4 deletions

View file

@ -115,6 +115,7 @@ void GLCanvas::throttleRender() {
OculusManager::beginFrameTiming(); OculusManager::beginFrameTiming();
} }
makeCurrent();
Application::getInstance()->paintGL(); Application::getInstance()->paintGL();
swapBuffers(); swapBuffers();

View file

@ -298,8 +298,11 @@ bool OffscreenUi::eventFilter(QObject* originalDestination, QEvent* event) {
mapWindowToUi(wheelEvent->pos(), originalDestination), mapWindowToUi(wheelEvent->pos(), originalDestination),
wheelEvent->delta(), wheelEvent->buttons(), wheelEvent->delta(), wheelEvent->buttons(),
wheelEvent->modifiers(), wheelEvent->orientation()); wheelEvent->modifiers(), wheelEvent->orientation());
QCoreApplication::sendEvent(_quickWindow, &mappedEvent); mappedEvent.ignore();
return true; if (QCoreApplication::sendEvent(_quickWindow, &mappedEvent)) {
return mappedEvent.isAccepted();
}
break;
} }
// Fall through // Fall through
@ -314,8 +317,11 @@ bool OffscreenUi::eventFilter(QObject* originalDestination, QEvent* event) {
mapWindowToUi(transformedPos, originalDestination), mapWindowToUi(transformedPos, originalDestination),
mouseEvent->screenPos(), mouseEvent->button(), mouseEvent->screenPos(), mouseEvent->button(),
mouseEvent->buttons(), mouseEvent->modifiers()); mouseEvent->buttons(), mouseEvent->modifiers());
QCoreApplication::sendEvent(_quickWindow, &mappedEvent); mappedEvent.ignore();
return QObject::event(event); if (QCoreApplication::sendEvent(_quickWindow, &mappedEvent)) {
return mappedEvent.isAccepted();
}
break;
} }
default: default: