mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
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
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue