diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-10-23 09:57:59 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-23 13:15:54 +0200 |
commit | cbcfbd798fc2dec55217a5ab6fb34b67e0f73ba3 (patch) | |
tree | aa8625a2851fa1dab997fc536a3b3e329b47110e /src/plugins/platforms/windows | |
parent | 5d8a882c11201a29475c5ea71cfb76c9de6573f5 (diff) |
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 <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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()) |