summaryrefslogtreecommitdiffstats
path: root/vncviewer/CConn.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-04-29 11:18:12 +0000
committerPierre Ossman <ossman@cendio.se>2011-04-29 11:18:12 +0000
commitd4c61ce93bc0c63eddc52bb4aff67dee6e6361e3 (patch)
treefe30600f5d22a5e29b8758d54681b5a05c812ba6 /vncviewer/CConn.cxx
parenta75f8f8fa852549befb024e6d27fee93d8b310f4 (diff)
downloadtigervnc-d4c61ce93bc0c63eddc52bb4aff67dee6e6361e3.tar.gz
tigervnc-d4c61ce93bc0c63eddc52bb4aff67dee6e6361e3.zip
Implement menu entry for forced refresh of screen.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4392 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer/CConn.cxx')
-rw-r--r--vncviewer/CConn.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx
index e9032840..faf85cc9 100644
--- a/vncviewer/CConn.cxx
+++ b/vncviewer/CConn.cxx
@@ -48,7 +48,8 @@ CConn::CConn(const char* vncServerName)
: serverHost(0), serverPort(0), sock(NULL), desktop(NULL),
currentEncoding(encodingTight), lastServerEncoding((unsigned int)-1),
formatChange(false), encodingChange(false),
- firstUpdate(true), pendingUpdate(false)
+ firstUpdate(true), pendingUpdate(false),
+ forceNonincremental(false)
{
setShared(::shared);
@@ -98,6 +99,14 @@ CConn::~CConn()
delete sock;
}
+void CConn::refreshFramebuffer()
+{
+ // FIXME: We cannot safely trigger an update request directly but must
+ // wait for the next update to arrive.
+ if (!formatChange)
+ forceNonincremental = true;
+}
+
// The RFB core is not properly asynchronous, so it calls this callback
// whenever it needs to block to wait for more data. Since FLTK is
// monitoring the socket, we just make sure FLTK gets to run.
@@ -442,9 +451,16 @@ void CConn::requestNewUpdate()
desktop->setServerPF(pf);
cp.setPF(pf);
writer()->writeSetPixelFormat(pf);
+
+ forceNonincremental = true;
+
+ formatChange = false;
}
+
checkEncodings();
+
writer()->writeFramebufferUpdateRequest(Rect(0, 0, cp.width, cp.height),
- !formatChange);
- formatChange = false;
+ !forceNonincremental);
+
+ forceNonincremental = false;
}