diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-06-13 08:59:45 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-06-13 13:32:45 +0200 |
commit | 9c80a3be4b3beb28a3a6bda717c15b0ded523557 (patch) | |
tree | dbe14890ac7ea73db03d97fb776af2c1a8061fa6 /src | |
parent | 5da108a4a76b163116f1b816090075a9b86cf077 (diff) |
Revert "Suppress move/resize events if they are the result of call to move()/resize()."
This reverts commit a1c5198387fdb7db44a02bb94c56187874e67304.
The idea of detecting non-spontaneous events by comparing
against the widget's crect has problems when sequences
of programmatic resizes occur. In addition, QWindowSystemInterface's
queueing of events is problematic for this.
Task-number: QTBUG-39611
Task-number: QTBUG-32590
Change-Id: I4674d8d5d5d432d938f7226b5790543335665c1f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 35a526e77d..fc328e7af0 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -591,24 +591,16 @@ void QWidgetWindow::updateNormalGeometry() void QWidgetWindow::handleMoveEvent(QMoveEvent *event) { - // If the widget's position already matches that of the event, this is a - // result of call to QWidget::move(), which already sends an event. - const bool spontaneous = m_widget->geometry().topLeft() != event->pos(); updateGeometry(); - if (spontaneous) - QGuiApplication::sendSpontaneousEvent(m_widget, event); + QGuiApplication::sendSpontaneousEvent(m_widget, event); } void QWidgetWindow::handleResizeEvent(QResizeEvent *event) { QSize oldSize = m_widget->data->crect.size(); - // If the widget's size already matches that of the event, this is a - // result of call to QWidget::resize(), which already sends an event. - const bool spontaneous = oldSize != event->size(); updateGeometry(); - if (spontaneous) - QGuiApplication::sendSpontaneousEvent(m_widget, event); + QGuiApplication::sendSpontaneousEvent(m_widget, event); if (m_widget->d_func()->paintOnScreen()) { QRegion updateRegion(geometry()); |