summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-16 14:48:59 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-16 14:54:26 +1000
commitfbe6a9aaae0c6de017af08150678bf2001284178 (patch)
tree0ccf66e75756c2b790ab83f06599bf277bd940de /src
parent2eb373a68367a6511e12d60034e920345431bcc8 (diff)
downloadqt4-tools-fbe6a9aaae0c6de017af08150678bf2001284178.tar.gz
Recognize transformed screens when looking for a QGLScreen
If the QWS_DISPLAY is specified as "Transformed:powervr:...", then we will encounter QScreen::TransformedClass rather than QScreen::ProxyClass when searching for the QGLScreen. This change makes the code search for both. Task-number: QT-2261 Reviewed-by: Sarah Smith Back port of 8e4fa6e87f74cfb3457e8270a361cf30ca7d3593
Diffstat (limited to 'src')
-rw-r--r--src/opengl/qegl_qws.cpp3
-rw-r--r--src/opengl/qgl_qws.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl/qegl_qws.cpp b/src/opengl/qegl_qws.cpp
index 8d1c8b0cf3..f0433bb105 100644
--- a/src/opengl/qegl_qws.cpp
+++ b/src/opengl/qegl_qws.cpp
@@ -65,7 +65,8 @@ static QGLScreen *glScreenForDevice(QPaintDevice *device)
screenNumber = 0;
screen = screen->subScreens()[screenNumber];
}
- while (screen->classId() == QScreen::ProxyClass) {
+ while (screen->classId() == QScreen::ProxyClass ||
+ screen->classId() == QScreen::TransformedClass) {
screen = static_cast<QProxyScreen *>(screen)->screen();
}
if (screen->classId() == QScreen::GLClass)
diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp
index 4058b66bff..dd578b2884 100644
--- a/src/opengl/qgl_qws.cpp
+++ b/src/opengl/qgl_qws.cpp
@@ -72,7 +72,8 @@ static QGLScreen *glScreenForDevice(QPaintDevice *device)
screenNumber = 0;
screen = screen->subScreens()[screenNumber];
}
- while (screen->classId() == QScreen::ProxyClass) {
+ while (screen->classId() == QScreen::ProxyClass ||
+ screen->classId() == QScreen::TransformedClass) {
screen = static_cast<QProxyScreen *>(screen)->screen();
}
if (screen->classId() == QScreen::GLClass)