commit d3254d00ce16359b96c164e7e3a014b1a3f4283c
parent f127c2f4a33c3cbdf1791b1f14cbc0314762271c
Author: Pavel Renev <an2qzavok@gmail.com>
Date: Sat, 31 Jul 2021 21:26:30 +0000
massage code into working
Diffstat:
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/fs.c b/fs.c
@@ -63,7 +63,8 @@ fs_write(Req *r)
r->ofcall.count = r->ifcall.count;
respond(r, nil);
qunlock(rich.l);
- generatepage(&rich);
+ //generatepage(&rich);
+ redraw(1);
/* there should be a call to redraw(), probably */
} else respond(r, "fs_write: f->aux is nil");
}
diff --git a/richterm.c b/richterm.c
@@ -60,13 +60,7 @@ threadmain(int argc, char **argv)
qunlock(rich.l);
- if(rfork(RFENVG) < 0)
- sysfatal("rfork: %r");
- atexit(shutdown);
- pidchan = chancreate(sizeof(int), 0);
- proccreate(runcmd, argv, 16 * 1024);
- hostpid = recvul(pidchan);
if (initdraw(0, 0, "richterm") < 0)
sysfatal("%s: %r", argv0);
@@ -79,6 +73,14 @@ threadmain(int argc, char **argv)
resize();
redraw(1);
+ if(rfork(RFENVG) < 0)
+ sysfatal("rfork: %r");
+ atexit(shutdown);
+
+ pidchan = chancreate(sizeof(int), 0);
+ proccreate(runcmd, argv, 16 * 1024);
+ hostpid = recvul(pidchan);
+
if ((mctl = initmouse(nil, screen)) == nil)
sysfatal("%s: %r", argv0);
if ((kctl = initkeyboard(nil)) == nil)