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> |
||
|---|---|---|
| .. | ||
| testdata/paintEvent | ||
| .gitignore | ||
| geometry-fullscreen.dat | ||
| geometry-maximized.dat | ||
| geometry.dat | ||
| qwidget.pro | ||
| qwidget.qrc | ||
| tst_qwidget.cpp | ||
| tst_qwidget_mac_helpers.h | ||
| tst_qwidget_mac_helpers.mm | ||