Fixed wrong mouse coordinate mapping.

QApplication::pickMouseReceiver() does the appropriate mapping if the
receiver changes.

Change-Id: Ieead2dea55e6119fae695af7fa12ab5cb2ef6dac
Reviewed-on: http://codereview.qt-project.org/5148
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Samuel Rødal 2011-09-19 15:01:19 +02:00 committed by Qt by Nokia
parent 3803111692
commit 7ecbfe6d01

View File

@ -236,11 +236,8 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
QWidget *widget = m_widget->childAt(event->pos());
QPoint mapped = event->pos();
if (widget) {
mapped = widget->mapFrom(m_widget, event->pos());
} else {
if (!widget)
widget = m_widget;
}
if (event->type() == QEvent::MouseButtonPress && !qt_button_down)
qt_button_down = widget;