summaryrefslogtreecommitdiffstats
path: root/libvncclient/vncviewer.c
diff options
context:
space:
mode:
authordscho <dscho>2007-02-01 15:05:55 +0000
committerdscho <dscho>2007-02-01 15:05:55 +0000
commit14b290384a46c5fd9885a7e34d2855dc823771d3 (patch)
treebdb1afa607402080a5b53d3a369c8b71a19452ae /libvncclient/vncviewer.c
parent35d481a783474d8b5eab4e9924008414253bbf4c (diff)
downloadlibvncserver-14b290384a46c5fd9885a7e34d2855dc823771d3.zip
libvncserver-14b290384a46c5fd9885a7e34d2855dc823771d3.tar.gz
LibVNCClient: some users do not want to get whole-screen updates; introduce client->updateRect for that
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r--libvncclient/vncviewer.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index 2e42b87..ffb0976 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -119,7 +119,10 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,
client->CurrentKeyboardLedState = 0;
client->HandleKeyboardLedState = (HandleKeyboardLedStateProc)DummyPoint;
-
+
+ /* default: use complete frame buffer */
+ client->updateRect.x = -1;
+
client->format.bitsPerPixel = bytesPerPixel*8;
client->format.depth = bitsPerSample*samplesPerPixel;
client->appData.requestedDepth=client->format.depth;
@@ -202,20 +205,30 @@ static rfbBool rfbInitConnection(rfbClient* client)
client->height=client->si.framebufferHeight;
client->MallocFrameBuffer(client);
+ if (client->updateRect.x < 0) {
+ client->updateRect.x = client->updateRect.y = 0;
+ client->updateRect.w = client->width;
+ client->updateRect.h = client->height;
+ }
+
if (client->appData.scaleSetting>1)
{
if (!SendScaleSetting(client, client->appData.scaleSetting))
return FALSE;
if (!SendFramebufferUpdateRequest(client,
- 0,0,
- client->width/client->appData.scaleSetting,
- client->height/client->appData.scaleSetting,FALSE))
- return FALSE;
+ client->updateRect.x / client->appData.scaleSetting,
+ client->updateRect.y / client->appData.scaleSetting,
+ client->updateRect.w / client->appData.scaleSetting,
+ client->updateRect.h / client->appData.scaleSetting,
+ FALSE))
+ return FALSE;
}
else
{
if (!SendFramebufferUpdateRequest(client,
- 0,0,client->width,client->height,FALSE))
+ client->updateRect.x, client->updateRect.y,
+ client->updateRect.w, client->updateRect.h,
+ FALSE))
return FALSE;
}
OpenPOWER on IntegriCloud