diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/devdraw/devdraw.h | 2 | ||||
-rw-r--r-- | src/cmd/devdraw/x11-itrans.c | 10 | ||||
-rw-r--r-- | src/cmd/devdraw/x11-srv.c | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/cmd/devdraw/devdraw.h b/src/cmd/devdraw/devdraw.h index 074cf0d7..7abf212e 100644 --- a/src/cmd/devdraw/devdraw.h +++ b/src/cmd/devdraw/devdraw.h @@ -4,4 +4,6 @@ void _initdisplaymemimage(Memimage*); int _latin1(Rune*, int); int parsewinsize(char*, Rectangle*, int*); int mouseswap(int); +void abortcompose(void); + diff --git a/src/cmd/devdraw/x11-itrans.c b/src/cmd/devdraw/x11-itrans.c index ff127c04..7a4df248 100644 --- a/src/cmd/devdraw/x11-itrans.c +++ b/src/cmd/devdraw/x11-itrans.c @@ -137,12 +137,20 @@ __xtoplan9kbd(XEvent *e) return k+0; } +int alting; + +void +abortcompose(void) +{ + alting = 0; +} + extern int _latin1(Rune*, int); static Rune* xtoplan9latin1(XEvent *e) { static Rune k[10]; - static int alting, nk; + static int nk; int n; int r; diff --git a/src/cmd/devdraw/x11-srv.c b/src/cmd/devdraw/x11-srv.c index 2035a068..5a4be705 100644 --- a/src/cmd/devdraw/x11-srv.c +++ b/src/cmd/devdraw/x11-srv.c @@ -36,7 +36,7 @@ Button2MotionMask|\ Button3MotionMask) -#define Mask MouseMask|ExposureMask|StructureNotifyMask|KeyPressMask|EnterWindowMask|LeaveWindowMask +#define Mask MouseMask|ExposureMask|StructureNotifyMask|KeyPressMask|EnterWindowMask|LeaveWindowMask|FocusChangeMask typedef struct Kbdbuf Kbdbuf; typedef struct Mousebuf Mousebuf; @@ -549,6 +549,10 @@ runxevent(XEvent *xev) matchkbd(); break; + case FocusOut: + abortcompose(); + break; + case SelectionRequest: _xselect(xev); break; |