From cbcfbd798fc2dec55217a5ab6fb34b67e0f73ba3 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 23 Oct 2013 09:57:59 +0200 Subject: Rely on isLayered() to decide layering The logic here was a bit broken. Every QWindow has an opacity which is 1 by default so the expose was hit for every single window, regardless of it being layered or not. Change-Id: I04873cd5db1cd147708e7de140f5947d3a01e9e1 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowswindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/windows') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index be739d0551..1909e0313b 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1056,9 +1056,10 @@ void QWindowsWindow::setVisible(bool visible) // When the window is layered, we won't get WM_PAINT, and "we" are in control // over the rendering of the window // There is nobody waiting for this, so we don't need to flush afterwards. - QWindow *w = window(); - if (w->format().hasAlpha() || qFuzzyCompare(w->opacity(), qreal(1))) + if (isLayered()) { + QWindow *w = window(); fireExpose(QRect(0, 0, w->width(), w->height())); + } } else { if (hasMouseCapture()) -- cgit v1.2.3