summaryrefslogtreecommitdiffstats
path: root/src/client/vnc/vncwindow.cpp
diff options
context:
space:
mode:
authorsr2013-02-06 20:33:54 +0100
committersr2013-02-06 20:33:54 +0100
commitb20bdd9202dd07871f765a320343377f86e4d5ca (patch)
treeaef62048c64ddfc805b8216fd973b2c73e793532 /src/client/vnc/vncwindow.cpp
parent[SERVER] Get "stop projection" right (diff)
downloadpvs2-b20bdd9202dd07871f765a320343377f86e4d5ca.tar.gz
pvs2-b20bdd9202dd07871f765a320343377f86e4d5ca.tar.xz
pvs2-b20bdd9202dd07871f765a320343377f86e4d5ca.zip
[CLIENT] Request full screen update from VNC server after the frame buffer has been set up
Diffstat (limited to 'src/client/vnc/vncwindow.cpp')
-rw-r--r--src/client/vnc/vncwindow.cpp17
1 files changed, 12 insertions, 5 deletions
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