diff options
Diffstat (limited to 'src/client/vnc')
-rw-r--r-- | src/client/vnc/vncthread.cpp | 2 | ||||
-rw-r--r-- | src/client/vnc/vncwindow.cpp | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/client/vnc/vncthread.cpp b/src/client/vnc/vncthread.cpp index 492f970..86db840 100644 --- a/src/client/vnc/vncthread.cpp +++ b/src/client/vnc/vncthread.cpp @@ -292,6 +292,8 @@ rfbBool VncThread::frameBufferHandler(rfbClient *client) t->calcScaling(); + SendFramebufferUpdateRequest(client, 0, 0, width, height, false); + return true; } diff --git a/src/client/vnc/vncwindow.cpp b/src/client/vnc/vncwindow.cpp index 6cbb23e..f55aa28 100644 --- a/src/client/vnc/vncwindow.cpp +++ b/src/client/vnc/vncwindow.cpp @@ -26,7 +26,7 @@ VncWindow::VncWindow(QWidget *parent) : VncWindow::~VncWindow() { - close(); + // } //////////////////////////////////////////////////////////////////////////////// @@ -100,6 +100,11 @@ void VncWindow::onThreadFinished() _vncWorker = NULL; this->close(); } + if(_redrawTimer != 0) + { + killTimer(_redrawTimer); + _redrawTimer = 0; + } } /** @@ -108,7 +113,7 @@ void VncWindow::onThreadFinished() void VncWindow::onProjectionStarted() { emit running(true, _clientId); - _redrawTimer = startTimer(2000); + //_redrawTimer = startTimer(5000); } //////////////////////////////////////////////////////////////////////////////// @@ -116,13 +121,13 @@ void VncWindow::onProjectionStarted() void VncWindow::timerEvent(QTimerEvent *event) { - killTimer(event->timerId()); if (event->timerId() == _redrawTimer) { - _redrawTimer = 0; if (this->isVisible()) this->repaint(); } + else + killTimer(event->timerId()); } void VncWindow::paintEvent(QPaintEvent *event) @@ -135,7 +140,6 @@ void VncWindow::paintEvent(QPaintEvent *event) void VncWindow::resizeEvent(QResizeEvent* event) { _vncWorker->setTargetSize(event->size()); - _redrawTimer = startTimer(1000); } void VncWindow::draw(const int x, const int y, const int w, const int h) @@ -256,7 +260,10 @@ void VncWindow::keyEventHandler(QKeyEvent *e) void VncWindow::keyPressEvent(QKeyEvent* event) { if (event->key() == Qt::Key_Escape) + { + _clientId = 0; this->close(); + } } //removes modifier keys which have been pressed |