Revert "Revert "Fixed duplicate QMoveEvent generated for each QWidget::move call""
This reverts commit c3e416296a1026d7ba99cf209f5e0720ff5050b1. 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:
parent
3ccfc351fd
commit
5da108a4a7
@ -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);
|
QMoveEvent e(q->pos(), oldPos);
|
||||||
QApplication::sendEvent(q, &e);
|
QApplication::sendEvent(q, &e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user