mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Fix mouse wheel and clickthrough bugs in offscreen UI
This commit is contained in:
parent
ac7b373231
commit
d0af5580c8
1 changed files with 10 additions and 4 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue