summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-10-16 11:33:02 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-10-16 11:38:13 (GMT)
commitbfdba4c5099bf57e0ec723b1b054ea8298e27f8e (patch)
tree6ab2da68ae858ddcda1c52c7257066e52f542907
parent3fc6f2c08d9648afc489175363a335e56b3f6526 (diff)
downloadQt-bfdba4c5099bf57e0ec723b1b054ea8298e27f8e.zip
Qt-bfdba4c5099bf57e0ec723b1b054ea8298e27f8e.tar.gz
Qt-bfdba4c5099bf57e0ec723b1b054ea8298e27f8e.tar.bz2
Adjustable screen size for VNC
-rw-r--r--src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.cpp b/src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.cpp
index 52f354a..a97c594 100644
--- a/src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.cpp
+++ b/src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.cpp
@@ -53,7 +53,16 @@
QVNCGraphicsSystemScreen::QVNCGraphicsSystemScreen()
: mDepth(16), mFormat(QImage::Format_RGB16), mScreenImage(0)
{
- mGeometry = QRect(0,0,800, 600);
+ int w = 800;
+ int h = 600;
+ int ew, eh;
+ const char *str;
+ if ((str=::getenv("QT_VNC_SIZE")) && sscanf(str,"%dx%d",&ew,&eh)==2) {
+ w = ew;
+ h = eh;
+ }
+
+ mGeometry = QRect(0,0,w, h);
mDepth = 32;
mFormat = QImage::Format_RGB32;