summaryrefslogtreecommitdiffstats
path: root/libvncserver/rfbserver.c
diff options
context:
space:
mode:
authorChristian Beier <[email protected]>2010-05-19 20:51:26 +0200
committerJohannes Schindelin <[email protected]>2010-05-19 21:17:57 +0200
commit09f7c684a2b7eb43f283dcd938f0ccad891724e8 (patch)
tree26eda117776744e9edd059589b1ab2c0334784fe /libvncserver/rfbserver.c
parenta29e42e515d5a99e29ab777159d04c213b7ceaa7 (diff)
downloadlibtdevnc-09f7c684a2b7eb43f283dcd938f0ccad891724e8.tar.gz
libtdevnc-09f7c684a2b7eb43f283dcd938f0ccad891724e8.zip
Implement a DisplayFinishedHook for libvncserver.
If set, this hook gets called just before rfbSendFrameBufferUpdate() returns. Signed-off-by: Christian Beier <[email protected]>
Diffstat (limited to 'libvncserver/rfbserver.c')
-rw-r--r--libvncserver/rfbserver.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index 465d767..48fd74a 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -2446,9 +2446,14 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
fu->nRects = Swap16IfLE(1);
cl->ublen = sz_rfbFramebufferUpdateMsg;
if (!rfbSendNewFBSize(cl, cl->scaledScreen->width, cl->scaledScreen->height)) {
+ if(cl->screen->displayFinishedHook)
+ cl->screen->displayFinishedHook(cl, FALSE);
return FALSE;
}
- return rfbSendUpdateBuf(cl);
+ result = rfbSendUpdateBuf(cl);
+ if(cl->screen->displayFinishedHook)
+ cl->screen->displayFinishedHook(cl, result);
+ return result;
}
/*
@@ -2564,6 +2569,8 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
!sendSupportedMessages && !sendSupportedEncodings && !sendServerIdentity) {
sraRgnDestroy(updateRegion);
UNLOCK(cl->updateMutex);
+ if(cl->screen->displayFinishedHook)
+ cl->screen->displayFinishedHook(cl, TRUE);
return TRUE;
}
@@ -2841,6 +2848,9 @@ updateFailed:
sraRgnReleaseIterator(i);
sraRgnDestroy(updateRegion);
sraRgnDestroy(updateCopyRegion);
+
+ if(cl->screen->displayFinishedHook)
+ cl->screen->displayFinishedHook(cl, result);
return result;
}