tlocking fixes - plan9port - [fork] Plan 9 from user space | |
git clone git://src.adamsgaard.dk/plan9port | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit eb0e8f26c4e6a3b4a4780132f2270efa530ad816 | |
parent e269d00c9ea2764885ba69aa08fe7b04f27179ec | |
Author: rsc <devnull@localhost> | |
Date: Sun, 26 Feb 2006 04:05:16 +0000 | |
locking fixes | |
Diffstat: | |
M src/cmd/faces/main.c | 5 ++++- | |
1 file changed, 4 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/src/cmd/faces/main.c b/src/cmd/faces/main.c | |
t@@ -330,7 +330,6 @@ addface(Face *f) /* always adds at 0 */ | |
if(f == nil) | |
return; | |
- lockdisplay(display); | |
if(first != 0){ | |
first = 0; | |
eresized(0); | |
t@@ -340,6 +339,7 @@ addface(Face *f) /* always adds at 0 */ | |
nx = nacross; | |
ny = (nfaces+(nx-1)) / nx; | |
+ lockdisplay(display); | |
for(y=ny; y>=0; y--){ | |
/* move them along */ | |
r0 = facerect(y*nx+0); | |
t@@ -613,8 +613,11 @@ click(int button, Mouse *m) | |
for(i=first; i<last; i++) /* clear vwhois faces… | |
if(ptinrect(p, facerect(i-first)) | |
&& strstr(faces[i]->str[Sshow], "/XXXvwhois")){ | |
+ lockdisplay(display); | |
delface(i); | |
flushimage(display, 1); | |
+ unlockdisplay(display); | |
+ break; | |
} | |
} | |
break; |