shithub: vdir

Download patch

ref: ede5b76c75425f4b6e78f95dd0af7fb32d9846bb
parent: 0bdf44080b3cbd88ad1876a737ede1098bdb15b0
author: phil9 <[email protected]>
date: Mon Oct 11 07:12:11 EDT 2021

remove display locking

	this is useless as there is no other thread or process involved

--- a/vdir.c
+++ b/vdir.c
@@ -343,7 +343,6 @@
 	Point p;
 	int i, h, y;
 
-	lockdisplay(display);
 	draw(screen, screen->r, display->white, nil, ZP);
 	p = addpt(screen->r.min, Pt(0, Toolpadding));
 	draw(screen, toolr, toolbg, nil, ZP);
@@ -371,7 +370,6 @@
 		drawdir(i, 0);
 	}
 	flushimage(display, 1);
-	unlockdisplay(display);
 }
 
 int
@@ -598,7 +596,7 @@
 	loaddirs();
 	if(initdraw(nil, nil, "vdir")<0)
 		sysfatal("initdraw: %r");
-	unlockdisplay(display);
+	display->locking = 0;
 	mctl = initmouse(nil, screen);
 	if(mctl==nil)
 		sysfatal("initmouse: %r");