ref: a5aaf3c13d09a93613de408a4dd94b3929c0e019
parent: 9bcc44edd377db1328f0f9b45810c6c42e17c5b4
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Jan 27 02:36:06 EST 2021
remove display locking
--- a/bar.c
+++ b/bar.c
@@ -128,11 +128,8 @@
Point p;
Tm tm;
- lockdisplay(display);
r = screen->r;
- draw(screen, r, cback, nil, ZP);
-
tf = tmfmt(tmnow(&tm, local), "YYYY/MM/DD WW hh:mm:ss");
p.x = r.min.x + Off;
p.y = (pos[0] == 't' || pos[1] == 't') ? r.max.y - (f->height + Off) : r.min.y + Off;
@@ -143,11 +140,11 @@
if(pos[0] == 'r' || pos[1] == 'r')
p.x = r.max.x - (stringwidth(f, s) + Off);
}
+ draw(screen, r, cback, nil, ZP);
string(screen, p, ctext, ZP, f, s);
split(s);
flushimage(display, 1);
- unlockdisplay(display);
snprint(tmp, sizeof(tmp), "%τ", tf);
twidth = MAX(twidth, stringwidth(f, tmp));
@@ -291,7 +288,6 @@
f = display->defaultfont;
minheight = 2*(Borderwidth+1) + f->height;
sepw = stringwidth(f, sep);
- unlockdisplay(display);
if((mctl = initmouse(nil, screen)) == nil)
sysfatal("initmouse: %r");
if((kctl = initkeyboard(nil)) == nil)