summaryrefslogtreecommitdiffstats
path: root/libvncserver/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncserver/cursor.c')
-rw-r--r--libvncserver/cursor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libvncserver/cursor.c b/libvncserver/cursor.c
index 5e30017..c071dd9 100644
--- a/libvncserver/cursor.c
+++ b/libvncserver/cursor.c
@@ -693,10 +693,13 @@ void rfbRedrawAfterHideCursor(rfbClientPtr cl,sraRegionPtr updateRegion)
if(sraClipRect2(&x,&y,&x2,&y2,0,0,s->width,s->height)) {
sraRegionPtr rect;
rect = sraRgnCreateRect(x,y,x2,y2);
- if(updateRegion)
+ if(updateRegion) {
sraRgnOr(updateRegion,rect);
- else
+ } else {
+ LOCK(cl->updateMutex);
sraRgnOr(cl->modifiedRegion,rect);
+ UNLOCK(cl->updateMutex);
+ }
sraRgnDestroy(rect);
}
}