summaryrefslogtreecommitdiffstats
path: root/common/rfb/VNCSConnectionST.cxx
diff options
context:
space:
mode:
authorConstantin Kaplinsky <const@tightvnc.com>2008-08-29 11:33:46 +0000
committerConstantin Kaplinsky <const@tightvnc.com>2008-08-29 11:33:46 +0000
commit2ef6695fe7dbc850d1981cbab04b7595f39328bc (patch)
tree4e0edf7c28a276a230982ff271edbddfd912dfc2 /common/rfb/VNCSConnectionST.cxx
parentf1f1c4bb0a4cf1d8eef2137bacb3803e31c27291 (diff)
downloadtigervnc-2ef6695fe7dbc850d1981cbab04b7595f39328bc.tar.gz
tigervnc-2ef6695fe7dbc850d1981cbab04b7595f39328bc.zip
[Bugfix] Fixed a problem with overloading x0vncserver by update requests, when video area is selected.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2742 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/VNCSConnectionST.cxx')
-rw-r--r--common/rfb/VNCSConnectionST.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 024be01c..84da709e 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -127,6 +127,17 @@ void VNCSConnectionST::processMessages()
processMsg();
}
+ // If there were update requests, try to send a framebuffer update.
+ // We don't send updates immediately on requests for two reasons:
+ // (1) If a video area is set, we don't want to send it on every
+ // update request. We should gobble all the pending update
+ // requests and send just one update.
+ // (2) This way, we give higher priority to user actions such as
+ // keyboard and pointer events.
+ if (!requested.is_empty()) {
+ writeFramebufferUpdate();
+ }
+
if (!clientsReadyBefore && !requested.is_empty())
server->desktop->framebufferUpdateRequest();
} catch (rdr::EndOfStream&) {
@@ -469,6 +480,8 @@ void VNCSConnectionST::framebufferUpdateRequest(const Rect& r,bool incremental)
SConnection::framebufferUpdateRequest(r, incremental);
+ // Just update the requested region.
+ // Framebuffer update will be sent a bit later, see processMessages().
Region reqRgn(r);
requested.assign_union(reqRgn);
@@ -477,8 +490,6 @@ void VNCSConnectionST::framebufferUpdateRequest(const Rect& r,bool incremental)
updates.add_changed(reqRgn);
server->comparer->add_changed(reqRgn);
}
-
- writeFramebufferUpdate();
}
void VNCSConnectionST::setVideoRectangle(const Rect& r)