diff options
| author | rsc <devnull@localhost> | 2003-11-23 18:15:43 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2003-11-23 18:15:43 +0000 |
| commit | 16a709666981e77a00a88a87b286b586ac77ffdc (patch) | |
| tree | 7320f931d0cdfcb86fe07dba025b489e66ed5648 /src/libdraw/x11-mouse.c | |
| parent | 986b36bccd134726eea42f2cfabff2943d729ac4 (diff) | |
| download | plan9port-16a709666981e77a00a88a87b286b586ac77ffdc.tar.gz plan9port-16a709666981e77a00a88a87b286b586ac77ffdc.zip | |
Add drawsetlabel(Display*, char*).
Turn window destruction into "hangup" note.
Fix (?) snarf buffer management.
Add latin1 keyboard translation.
Diffstat (limited to 'src/libdraw/x11-mouse.c')
| -rw-r--r-- | src/libdraw/x11-mouse.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libdraw/x11-mouse.c b/src/libdraw/x11-mouse.c index 6b5b3922..eae26788 100644 --- a/src/libdraw/x11-mouse.c +++ b/src/libdraw/x11-mouse.c @@ -66,6 +66,16 @@ _ioproc(void *arg) case Expose: xexpose(&xevent, _x.mousecon); continue; + case DestroyNotify: + if(xdestroy(&xevent, _x.mousecon)){ + /* drain it before sending */ + /* apps that care can notice we sent a 0 */ + /* otherwise we'll have getwindow send SIGHUP */ + nbrecv(mc->resizec, 0); + nbrecv(mc->resizec, 0); + send(mc->resizec, 0); + } + continue; case ConfigureNotify: if(xconfigure(&xevent, _x.mousecon)) nbsend(mc->resizec, &one); @@ -76,7 +86,7 @@ _ioproc(void *arg) case ButtonPress: case ButtonRelease: case MotionNotify: - if(xtoplan9mouse(&xevent, &m) < 0) + if(xtoplan9mouse(_x.mousecon, &xevent, &m) < 0) continue; send(mc->c, &m); /* |
