summaryrefslogtreecommitdiffstats
path: root/src/client/vnc/vncwindow.cpp
diff options
context:
space:
mode:
authorsr2013-02-06 19:21:04 +0100
committersr2013-02-06 19:21:04 +0100
commit49f3903f316ab7363b4543615d3231e1407a67ab (patch)
tree9f6ec082403f388c0e791de68b1743000a12bc49 /src/client/vnc/vncwindow.cpp
parent... (diff)
downloadpvs2-49f3903f316ab7363b4543615d3231e1407a67ab.tar.gz
pvs2-49f3903f316ab7363b4543615d3231e1407a67ab.tar.xz
pvs2-49f3903f316ab7363b4543615d3231e1407a67ab.zip
[SERVER] Add "stop projection" button
[SERVER] Don't show error message when VNC server stops as expected [SERVER/CLIENT] Implement connection timeout of 15 seconds
Diffstat (limited to 'src/client/vnc/vncwindow.cpp')
-rw-r--r--src/client/vnc/vncwindow.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/client/vnc/vncwindow.cpp b/src/client/vnc/vncwindow.cpp
index d4f6d40..aea2362 100644
--- a/src/client/vnc/vncwindow.cpp
+++ b/src/client/vnc/vncwindow.cpp
@@ -19,7 +19,7 @@
#include "vncthread.h"
VncWindow::VncWindow(QWidget *parent) :
- QDialog(parent), _vncWorker(NULL), _viewOnly(true), _buttonMask(0), _clientId(0)
+ QDialog(parent), _vncWorker(NULL), _viewOnly(true), _buttonMask(0), _clientId(0), _redrawTimer(0)
{
//
}
@@ -108,11 +108,23 @@ void VncWindow::onThreadFinished()
void VncWindow::onProjectionStarted()
{
emit running(true, _clientId);
+ _redrawTimer = startTimer(200);
}
////////////////////////////////////////////////////////////////////////////////
// Protected
+void VncWindow::timerEvent(QTimerEvent *event)
+{
+ killTimer(event->timerId());
+ if (event->timerId() == _redrawTimer)
+ {
+ _redrawTimer = 0;
+ if (this->isVisible())
+ this->repaint();
+ }
+}
+
void VncWindow::paintEvent(QPaintEvent *event)
{
const QRect &r = event->rect();
@@ -123,6 +135,7 @@ void VncWindow::paintEvent(QPaintEvent *event)
void VncWindow::resizeEvent(QResizeEvent* event)
{
_vncWorker->setTargetSize(event->size());
+ this->repaint();
}
void VncWindow::draw(const int x, const int y, const int w, const int h)