From 16a709666981e77a00a88a87b286b586ac77ffdc Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 23 Nov 2003 18:15:43 +0000 Subject: Add drawsetlabel(Display*, char*). Turn window destruction into "hangup" note. Fix (?) snarf buffer management. Add latin1 keyboard translation. --- src/libdraw/x11-mouse.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/libdraw/x11-mouse.c') 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); /* -- cgit v1.2.3