qt6-bb10/tests/auto/widgets/kernel/qwidget
Jan Arve Saether de1b98e9c1 Fallback to QWidget::grab() if QScreen::grabWindow() fails.
QScreen::grabWindow() is not always reliable because it grabs from the
framebuffer. (The window might then be covered by other windows, e.g.
"Stays on top"-Windows, popups etc).
If QScreen::grabWindow() fails we therefore fallback to
QWidget::grab(). This will not grab from the frame buffer, but it will
ask the widget to render itself (with its current state) to a pixmap
and return it.
QWidget::grab() should usually return the expected pixmap, and the
pixmap it gives is not subject to the state of the window manager.

This means that both QScreen::grabWindow() *and* QWidget::grab()
must produce an unexpected pixmap in order for the test to fail.

Change-Id: I276554155bb1e5b510d2a2d43628d91669464fe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-07 23:52:49 +01:00
..
testdata/paintEvent Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
geometry-fullscreen.dat Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
geometry-maximized.dat Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
geometry.dat Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
qwidget.pro WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
qwidget.qrc Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
tst_qwidget.cpp Fallback to QWidget::grab() if QScreen::grabWindow() fails. 2014-02-07 23:52:49 +01:00
tst_qwidget_mac_helpers.h Fix typo 2013-06-03 13:00:32 +02:00
tst_qwidget_mac_helpers.mm Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00