summaryrefslogtreecommitdiffstats
path: root/src/client/vnc/vncserver.cpp
diff options
context:
space:
mode:
authorManuel Schneider2014-04-29 20:39:09 +0200
committerManuel Schneider2014-04-29 20:39:09 +0200
commit03e3100c37fb9ce55ea63f74bec0b72acedf7ed0 (patch)
tree162276a7b7ca0ec8fd64ebc9792a1024bc385cbe /src/client/vnc/vncserver.cpp
parentAdding comments for each method in the .cpp files and class definition in the... (diff)
downloadpvs2-03e3100c37fb9ce55ea63f74bec0b72acedf7ed0.tar.gz
pvs2-03e3100c37fb9ce55ea63f74bec0b72acedf7ed0.tar.xz
pvs2-03e3100c37fb9ce55ea63f74bec0b72acedf7ed0.zip
Increased the timeout for debugging purposes; Instruct vncserver to trasmit just
the primary desktop; Thumbnails just display the primary dektop
Diffstat (limited to 'src/client/vnc/vncserver.cpp')
-rw-r--r--src/client/vnc/vncserver.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client/vnc/vncserver.cpp b/src/client/vnc/vncserver.cpp
index 8c1469a..3eca952 100644
--- a/src/client/vnc/vncserver.cpp
+++ b/src/client/vnc/vncserver.cpp
@@ -5,7 +5,10 @@
* Author: sr
*/
+
+#include <QApplication>
#include <QProcess>
+#include <QDesktopWidget>
#include "vncserver.h"
#include "../util/util.h"
@@ -96,6 +99,20 @@ void VncServer::start()
args << "-shared";
args << "-repeat";
args << "-autoport" << QString::number(54112);
+
+ // Get rect of primary screen
+ int primary = QApplication::desktop()->primaryScreen();
+ QRect primaryRect = QApplication::desktop()->availableGeometry(primary);
+
+ // Tell x11vnc to just use primary screen
+ args << "-clip";
+ QString rect;
+ rect = QString::number(primaryRect.width())
+ + "x" + QString::number(primaryRect.height())
+ + "+" + QString::number(primaryRect.x())
+ + "+" + QString::number(primaryRect.y());
+ args << rect;
+
qDebug() << "Arguments are: " << args;
_process->start("x11vnc",
args,