void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e)
{
- if (!e->window)
- return;
-
QEvent::Type type;
// move first
Qt::MouseButtons stateChange = e->buttons ^ buttons;
QWindow *window = e->window.data();
+ if (!window)
+ window = QGuiApplication::topLevelAt(e->globalPos.toPoint());
+
QPointF localPoint = e->localPos;
QPointF globalPoint = e->globalPos;