summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-02-26 13:37:59 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-02-26 13:40:51 (GMT)
commit9229489304894e35e137606ea263f007e5605d22 (patch)
tree7dc2a77ae667bddded53980ba25563bb31f02510 /src
parentf53f18d442629b859dd68ffbc2bae0ec104a9bd2 (diff)
downloadQt-9229489304894e35e137606ea263f007e5605d22.zip
Qt-9229489304894e35e137606ea263f007e5605d22.tar.gz
Qt-9229489304894e35e137606ea263f007e5605d22.tar.bz2
Fixed autotest tst_QWidget::translucentWidget() on Windows Vista & above
Grabbing layered windows doesn't work on Vista and above, so instead we need to grab the corresponding area of the desktop widget. Reviewed-by: Samuel
Diffstat (limited to 'src')
-rw-r--r--src/gui/image/qpixmap.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 1df7946..08003e5 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -2026,12 +2026,16 @@ QPixmap QPixmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
over the one you grab, you get pixels from the overlying window,
too. The mouse cursor is generally not grabbed.
- Note on X11that if the given \a window doesn't have the same depth
+ Note on X11 that if the given \a window doesn't have the same depth
as the root window, and another window partially or entirely
obscures the one you grab, you will \e not get pixels from the
overlying window. The contents of the obscured areas in the
pixmap will be undefined and uninitialized.
+ On Windows Vista and above grabbing a layered window, which is
+ created by setting the Qt::WA_TranslucentBackground attribute, will
+ not work. Instead grabbing the desktop widget should work.
+
\warning In general, grabbing an area outside the screen is not
safe. This depends on the underlying window system.