libdraw: send hangup to process when window is lost
This matches the Plan 9 behavior a bit better. Fixes #30.
This commit is contained in:
parent
9505cd15a6
commit
40d787ab12
@ -52,8 +52,12 @@ _ioproc(void *arg)
|
||||
one = 1;
|
||||
resized = 0;
|
||||
for(;;){
|
||||
if(_displayrdmouse(mc->display, &m, &resized) < 0)
|
||||
if(_displayrdmouse(mc->display, &m, &resized) < 0) {
|
||||
if(postnote(PNPROC, getpid(), "hangup") < 0)
|
||||
fprint(2, "postnote: %r\n");
|
||||
sleep(10*1000);
|
||||
threadexitsall("mouse read error");
|
||||
}
|
||||
if(resized)
|
||||
send(mc->resizec, &one);
|
||||
send(mc->c, &m);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user