diff options
Diffstat (limited to 'vncviewer/CConn.cxx')
-rw-r--r-- | vncviewer/CConn.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index f8b45af2..2acb373e 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -133,6 +133,7 @@ CConn::CConn(const char* vncServerName, network::Socket* socket=NULL) CConn::~CConn() { OptionsDialog::removeCallback(handleOptions); + Fl::remove_timeout(handleUpdateTimeout, this); for (size_t i = 0; i < sizeof(decoders)/sizeof(decoders[0]); i++) delete decoders[i]; @@ -344,6 +345,9 @@ void CConn::framebufferUpdateStart() pendingUpdate = false; requestNewUpdate(); + + // Update the screen prematurely for very slow updates + Fl::add_timeout(1.0, handleUpdateTimeout, this); } // framebufferUpdateEnd() is called at the end of an update. @@ -352,6 +356,7 @@ void CConn::framebufferUpdateStart() // appropriately, and then request another incremental update. void CConn::framebufferUpdateEnd() { + Fl::remove_timeout(handleUpdateTimeout, this); desktop->updateWindow(); if (firstUpdate) { @@ -692,3 +697,14 @@ void CConn::handleOptions(void *data) self->requestNewUpdate(); } } + +void CConn::handleUpdateTimeout(void *data) +{ + CConn *self = (CConn *)data; + + assert(self); + + self->desktop->updateWindow(); + + Fl::repeat_timeout(1.0, handleUpdateTimeout, data); +} |