aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw/x11-srv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/devdraw/x11-srv.c')
-rw-r--r--src/cmd/devdraw/x11-srv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/devdraw/x11-srv.c b/src/cmd/devdraw/x11-srv.c
index 04ecabee..b9343913 100644
--- a/src/cmd/devdraw/x11-srv.c
+++ b/src/cmd/devdraw/x11-srv.c
@@ -619,6 +619,12 @@ runxevent(XEvent *xev)
break;
case FocusOut:
+ /*
+ * Some key combinations (e.g. Alt-Tab) can cause us
+ * to see the key down event without the key up event,
+ * so clear out the keyboard state when we lose the focus.
+ */
+ kstate = 0;
abortcompose();
break;