wayland: Dispatch mouse events to internal windows via QWindowSystemInterface
QWindowSystemInterface goes via QGuiApplication which updates some internal properties. Most notably QGuiApplication::lastCursorPosition which is used by advanced menu closing behaviour. BUG: 478061
This commit is contained in:
parent
5244f9f406
commit
b36894884e
1 changed files with 8 additions and 6 deletions
|
@ -1188,12 +1188,14 @@ class InternalWindowEventFilter : public InputEventFilter
|
|||
// the handle can be nullptr if the tooltip gets closed while focus updates are blocked
|
||||
return false;
|
||||
}
|
||||
QMouseEvent mouseEvent(event->type(),
|
||||
event->pos() - internal->position(),
|
||||
event->globalPosition(),
|
||||
event->button(), event->buttons(), event->modifiers());
|
||||
QCoreApplication::sendEvent(internal, &mouseEvent);
|
||||
return mouseEvent.isAccepted();
|
||||
const bool isAccepted = QWindowSystemInterface::handleMouseEvent<QWindowSystemInterface::SynchronousDelivery>(internal,
|
||||
event->position() - internal->position(),
|
||||
event->globalPosition(),
|
||||
event->buttons(),
|
||||
event->button(),
|
||||
event->type(),
|
||||
event->modifiers());
|
||||
return isAccepted;
|
||||
}
|
||||
bool wheelEvent(WheelEvent *event) override
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue