Fix mouse wheel and clickthrough bugs in offscreen UI

This commit is contained in:
Brad Davis 2015-04-23 10:28:03 -07:00
parent ac7b373231
commit d0af5580c8

View file

@ -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: