summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-16 04:48:59 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-16 04:48:59 (GMT)
commit8e4fa6e87f74cfb3457e8270a361cf30ca7d3593 (patch)
treecda832f0297ecead59f8f4130a6aad1959e5e52c
parent8ca1bd6fccb080808331f9de056d3915a60917fb (diff)
downloadQt-8e4fa6e87f74cfb3457e8270a361cf30ca7d3593.zip
Qt-8e4fa6e87f74cfb3457e8270a361cf30ca7d3593.tar.gz
Qt-8e4fa6e87f74cfb3457e8270a361cf30ca7d3593.tar.bz2
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
-rw-r--r--src/gui/egl/qegl_qws.cpp3
-rw-r--r--src/opengl/qgl_qws.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp
index 590b666..df1179a 100644
--- a/src/gui/egl/qegl_qws.cpp
+++ b/src/gui/egl/qegl_qws.cpp
@@ -83,7 +83,8 @@ static QScreen *screenForDevice(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();
}
return screen;
diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp
index bb23ace..5e59975 100644
--- a/src/opengl/qgl_qws.cpp
+++ b/src/opengl/qgl_qws.cpp
@@ -73,7 +73,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)