summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-11-03 12:50:52 +0000
committerPierre Ossman <ossman@cendio.se>2011-11-03 12:50:52 +0000
commitfa6cda7b1d486019d51a06acfbb836d1d6256c77 (patch)
tree6f658b3b6ba4df019094b095ad0c2afe034f01fa
parent28c6bcc9b6d653c4790dc8cc14433ce5d13a7c50 (diff)
downloadtigervnc-fa6cda7b1d486019d51a06acfbb836d1d6256c77.tar.gz
tigervnc-fa6cda7b1d486019d51a06acfbb836d1d6256c77.zip
We informed the RFB layer of RENDER operations before they were actually
carried out. Under some circumstances, this could result in an update going out with the old framebuffer contents. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4753 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--unix/xserver/hw/vnc/vncHooks.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/unix/xserver/hw/vnc/vncHooks.cc b/unix/xserver/hw/vnc/vncHooks.cc
index 6d903a46..611ebcf5 100644
--- a/unix/xserver/hw/vnc/vncHooks.cc
+++ b/unix/xserver/hw/vnc/vncHooks.cc
@@ -556,6 +556,8 @@ void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate(pScreen);
PictureScreenPtr ps = GetPictureScreen(pScreen);
+ RegionHelper changed(pScreen);
+
if (pDst->pDrawable->type == DRAWABLE_WINDOW &&
((WindowPtr) pDst->pDrawable)->viewable) {
BoxRec box;
@@ -567,20 +569,25 @@ void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
height);
rect2 = rect1.intersect(vncHooksScreen->desktop->getRect());
- if (!rect2.is_empty()) {
- box.x1 = rect2.tl.x;
- box.y1 = rect2.tl.y;
- box.x2 = rect2.br.x;
- box.y2 = rect2.br.y;
- RegionHelper changed(pScreen, &box, 0);
- vncHooksScreen->desktop->add_changed(changed.reg);
- }
+
+ box.x1 = rect2.tl.x;
+ box.y1 = rect2.tl.y;
+ box.x2 = rect2.br.x;
+ box.y2 = rect2.br.y;
+
+ changed.init(&box, 0);
+ } else {
+ changed.init(NullBox, 0);
}
+
ps->Composite = vncHooksScreen->Composite;
(*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc,
xMask, yMask, xDst, yDst, width, height);
ps->Composite = vncHooksComposite;
+
+ if (REGION_NOTEMPTY(pScreen, changed.reg))
+ vncHooksScreen->desktop->add_changed(changed.reg);
}
#endif /* RENDER */