From 1cce35472a84aa81cec2ac42a6e0843ef92af267 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 30 Nov 2012 12:39:23 +0100 Subject: QPA: update backingstore also when moving QWindows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When moving QMdiSubWindows that contains native widgets (e.g QGLWidget) inside a QMdiArea, garbage is drawn to the screen. The reason is that since we use native QWindow backed widgets, QPA will assume that it does not need to update/scroll the backingstore. But since the backingstore can be shared among several windows, we need to do this to ensure that exposed areas behind the moved QWindow will be updated. Change-Id: I35f4d4069a73ab6cd6d610e25c176c752789a927 Task-number: QTBUG-26162 Reviewed-by: Samuel Rødal --- src/widgets/kernel/qwidget_qpa.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index aec5fcf0ca..2aee80ade4 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -737,7 +737,9 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) if (needsShow) show_sys(); - } else { + } + + if (!q->isWindow()) { if (isMove && !isResize) moveRect(QRect(oldPos, olds), x - oldPos.x(), y - oldPos.y()); else -- cgit v1.2.3