From 9c80a3be4b3beb28a3a6bda717c15b0ded523557 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 13 Jun 2014 08:59:45 +0200 Subject: 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 --- src/widgets/kernel/qwidgetwindow.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/widgets') 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()); -- cgit v1.2.3