summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-12-16 15:27:21 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2016-09-18 11:38:59 +0000
commitdc3af6a164f82c1f9fadf86e910656504ccc48e2 (patch)
tree47e67f6c545bc3de55522d4a620786677a0cfeaa /src/gui
parent5ad8b3aa32f7a085a97cbe95060551dff8ac726f (diff)
iOS: Implement support for QScreen::grabWindow()
Only windows that are part of the application can be grabbed. This excludes the system statusbar and other system overlays, as well as windows of other applications. This is a limitation due to the security model of iOS. There exists APIs to grab a snapshot of the complete screen, but these APIs return a view that can be used as a placeholder e.g. during view transformations, and doesn't match our API that require reading of pixels. Task-number: QTBUG-49944 Change-Id: I8fd5b4c2777be1486f0ff22762d5e9b64c927e70 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qscreen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index bc4a25a65f..1dd8fb5e67 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -667,6 +667,10 @@ void QScreenPrivate::updatePrimaryOrientation()
that are not part of the application, window system frames, and so
on.
+ \warning Grabbing windows that are not part of the application is
+ not supported on systems such as iOS, where sandboxing/security
+ prevents reading pixels of windows not owned by the application.
+
The grabWindow() function grabs pixels from the screen, not from
the window, i.e. if there is another window partially or entirely
over the one you grab, you get pixels from the overlying window,