From e28cefa64b02b61e305581abdbb0469b6e484c40 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Wed, 29 Apr 2009 10:43:45 +0200 Subject: Make QPixmap::grabWindow() work for top level windows. Its not enough to mask with Qt::Desktop because this enum value also includes Qt::Window so masking would give us a non-zero result thus causing the 'if' case to resolve to true which is not what we want. --- src/gui/image/qpixmap_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 6246592..625988a 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -27,7 +27,7 @@ QPixmap QPixmap::grabWindow(WId winId, int x, int y, int w, int h ) // Find out if this is one of our windows. QSymbianControl *sControl; sControl = winId->MopGetObject(sControl); - if (sControl && sControl->widget()->windowType() & Qt::Desktop) { + if (sControl && sControl->widget()->windowType() == Qt::Desktop) { // Grabbing desktop widget srcSize = screenSize; } else { -- cgit v0.12