summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Montgomery <apmontgomery@gmail.com>2014-01-14 13:53:10 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-03 20:31:13 +0100
commit72259baa76a0f1faa1983c720621676e9c15e15f (patch)
tree0feb874861e2af409c56530af3be180110ef7cc2
parent71eb4d493956161b7e4aa48bb7c1d4c6309e5a10 (diff)
downloadqtbase-72259baa76a0f1faa1983c720621676e9c15e15f.tar.gz
qtbase-72259baa76a0f1faa1983c720621676e9c15e15f.tar.bz2
qtbase-72259baa76a0f1faa1983c720621676e9c15e15f.zip
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>
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 0fd794cc02..ea6f27caf9 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -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);
}