pick up the target window for a mouse event when none is specified

Change-Id: Iae0402f63f39a2728b94abe68fa22592d97ea9f3
Reviewed-on: http://codereview.qt.nokia.com/3885
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
This commit is contained in:
Gunnar Sletta 2011-08-30 15:00:38 +02:00 committed by Laszlo Agocs
parent dc44b86a6e
commit 11f867c34a

View File

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