summaryrefslogtreecommitdiffstats
path: root/src/client/net/serverconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/net/serverconnection.cpp')
-rw-r--r--src/client/net/serverconnection.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/client/net/serverconnection.cpp b/src/client/net/serverconnection.cpp
index 530701d..afc43aa 100644
--- a/src/client/net/serverconnection.cpp
+++ b/src/client/net/serverconnection.cpp
@@ -34,9 +34,9 @@ ServerConnection::ServerConnection(const QString& host, const quint16 port, cons
);
qDebug("Connecting to %s on port %d", host.toUtf8().data(), (int)port);
_socket->connectToHostEncrypted(host, port);
- _timerId = startTimer(4000);
+ _timerId = startTimer(600000);// TODO(manuel): Debuging purposes
_lastData = QDateTime::currentMSecsSinceEpoch() + PING_TIMEOUT_MS;
- _timerConnectionCheck = startTimer(5000);
+ _timerConnectionCheck = startTimer(600000);// TODO(manuel): Debuging purposes
// Connect the vnc start/stop signal to this class, so we can tell the server about successful vnc server startup
connect(VncServer::instance(), SIGNAL(started(int, QString&, QString&)), this, SLOT(onVncServerStartStop(int, QString&, QString&)));
}
@@ -189,7 +189,19 @@ void ServerConnection::handleMsg()
y = 18;
else if (y > 300)
y = 300;
- QPixmap desktop(QPixmap::grabWindow(QApplication::desktop()->winId()).scaled(
+
+ // Get rect of primary screen
+ int primary = QApplication::desktop()->primaryScreen();
+ QRect primaryRect = QApplication::desktop()->availableGeometry(primary);
+
+ QPixmap desktop(
+ QPixmap::grabWindow(
+ QApplication::desktop()->winId(),
+ primaryRect.x(),
+ primaryRect.y(),
+ primaryRect.width(),
+ primaryRect.height()
+ ).scaled(
x, y,
Qt::KeepAspectRatio,
Qt::SmoothTransformation));