shithub: riscv

Download patch

ref: e7399181a9652ac32193318bf7ffd268c96ab117
parent: f2f2c8687afbe0af3fa98376bab3ed27d1d82801
author: cinap_lenrek <[email protected]>
date: Wed Jan 16 04:51:15 EST 2013

vncv: do flushimage() under display lock, zero ypdate rect

--- a/sys/src/cmd/vnc/draw.c
+++ b/sys/src/cmd/vnc/draw.c
@@ -63,6 +63,7 @@
 	int x, y;
 
 	lockdisplay(display);
+	flushimage(display, 1);
 	x = Dx(screen->r);
 	y = Dy(screen->r);
 	unlockdisplay(display);
@@ -236,8 +237,6 @@
 	Rectangle r, subr, maxr;
 
 	r = vncrdrect(v);
-	if(r.min.x == r.max.x || r.min.y == r.max.y)
-		return;
 	if(!rectinrect(r, Rpt(ZP, v->dim)))
 		sysfatal("bad rectangle from server: %R not in %R", r, Rpt(ZP, v->dim));
 	stride = Dx(r) * pixb;
@@ -364,7 +363,6 @@
 			n = vncrdshort(v);
 			while(n-- > 0)
 				dorectangle(v);
-			flushimage(display, 1);
 			requestupdate(v, 1);
 			break;