From b924333bee4d82f4218f4cce5e517ece3207c2ee Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 23 Nov 2012 17:04:43 +0100 Subject: [PATCH] QQuickWindow cannot rely on QWindowPrivate.geometry MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit because sometimes geometry has been set on the platform window and sometimes it's only stored in the QWindow geometry, waiting for the asynchronous confirmation. So it should call QWindow::geometry() instead. Change-Id: Ifa54792be31440108fae212240a46ae269393eb7 Reviewed-by: Samuel Rødal --- src/quick/items/qquickwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 806766d..99db98d 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1996,12 +1996,13 @@ bool QQuickWindowPrivate::dragOverThreshold(qreal d, Qt::Axis axis, QMouseEvent bool QQuickWindowPrivate::isRenderable() const { - if (geometry.width() <= 0 || geometry.height() <= 0) + const QQuickWindow *q = q_func(); + QRect geom = q->geometry(); + if (geom.width() <= 0 || geom.height() <= 0) return false; // Change to be applied after the visibility property is integrated in qtbase: // return visibility != QWindow::Hidden || (renderWithoutShowing && platformWindow); // Temporary version which is implementation-agnostic but slightly less efficient: - const QQuickWindow *q = q_func(); return q->isVisible() || (renderWithoutShowing && platformWindow); } -- 2.7.4