diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-09-19 15:01:19 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-19 21:05:28 +0200 |
commit | 7ecbfe6d01e71eeb5346523cb72d874ea3cbad46 (patch) | |
tree | f105e5a1bdc61ad899b756b26229cb9f5b73cb93 /src/widgets/kernel/qwidgetwindow_qpa.cpp | |
parent | 3803111692b58bd0bb96878d8e2442a38e16b8ef (diff) | |
download | qtbase-7ecbfe6d01e71eeb5346523cb72d874ea3cbad46.tar.gz |
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>
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow_qpa.cpp')
-rw-r--r-- | src/widgets/kernel/qwidgetwindow_qpa.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp index 0286f535b4..6f6018a6c0 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa.cpp +++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp @@ -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; |