mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Merge pull request #4679 from jherico/offscreen
Fix a couple of bugs with the new offscreen UI
This commit is contained in:
commit
ad7293d4ad
2 changed files with 11 additions and 4 deletions
|
@ -115,6 +115,7 @@ void GLCanvas::throttleRender() {
|
|||
OculusManager::beginFrameTiming();
|
||||
}
|
||||
|
||||
makeCurrent();
|
||||
Application::getInstance()->paintGL();
|
||||
swapBuffers();
|
||||
|
||||
|
|
|
@ -298,8 +298,11 @@ bool OffscreenUi::eventFilter(QObject* originalDestination, QEvent* event) {
|
|||
mapWindowToUi(wheelEvent->pos(), originalDestination),
|
||||
wheelEvent->delta(), wheelEvent->buttons(),
|
||||
wheelEvent->modifiers(), wheelEvent->orientation());
|
||||
QCoreApplication::sendEvent(_quickWindow, &mappedEvent);
|
||||
return true;
|
||||
mappedEvent.ignore();
|
||||
if (QCoreApplication::sendEvent(_quickWindow, &mappedEvent)) {
|
||||
return mappedEvent.isAccepted();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Fall through
|
||||
|
@ -314,8 +317,11 @@ bool OffscreenUi::eventFilter(QObject* originalDestination, QEvent* event) {
|
|||
mapWindowToUi(transformedPos, originalDestination),
|
||||
mouseEvent->screenPos(), mouseEvent->button(),
|
||||
mouseEvent->buttons(), mouseEvent->modifiers());
|
||||
QCoreApplication::sendEvent(_quickWindow, &mappedEvent);
|
||||
return QObject::event(event);
|
||||
mappedEvent.ignore();
|
||||
if (QCoreApplication::sendEvent(_quickWindow, &mappedEvent)) {
|
||||
return mappedEvent.isAccepted();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue