summaryrefslogtreecommitdiffstats
path: root/src/client/vnc/vncwindow.cpp
diff options
context:
space:
mode:
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)