Fixed duplicate QMoveEvent generated for each QWidget::move call

Removed QMoveEvent generating code from QWidgetPrivate::setGeometry_sys
for widgets with native window handles. A move event is already
generated for them by QGuiApplicationPrivate::processGeometryChangeEvent.

Task-number: QTBUG-32590
Change-Id: I73313a012851516047ac017f1e15a21774d8ffe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Alex Montgomery 2014-01-14 13:53:10 -08:00 committed by The Qt Project
parent 71eb4d4939
commit 72259baa76

View File

@ -768,7 +768,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);
}