Revert "Revert "Fixed duplicate QMoveEvent generated for each QWidget::move call""

This reverts commit c3e416296a.

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: I9ff8049add147be23e064a513e8645ae04577c6c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
Friedemann Kleint 2014-06-13 08:56:17 +02:00
parent 3ccfc351fd
commit 5da108a4a7

View File

@ -779,7 +779,10 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
}
}
if (isMove) {
// generate a move event for QWidgets without window handles. QWidgets with native
// window handles already receive a move event from
// QGuiApplicationPrivate::processGeometryChangeEvent.
if (isMove && (!q->windowHandle() || q->testAttribute(Qt::WA_DontShowOnScreen))) {
QMoveEvent e(q->pos(), oldPos);
QApplication::sendEvent(q, &e);
}