mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
cmd/devdraw: clear keyboard state on lost focus.
See https://bitbucket.org/rsc/plan9port/issue/128/alt-button-sticks-in-acme-sometimes-after R=rsc https://codereview.appspot.com/11453043
This commit is contained in:
parent
3d31240bfd
commit
d74fdb6edb
2 changed files with 7 additions and 0 deletions
|
@ -40,6 +40,7 @@ Peter Saveliev <svinota.saveliev@gmail.com>
|
|||
Richard Miller <millerresearch@gmail.com>
|
||||
Rob Kroeger <robkroeger@gmail.com>
|
||||
Rob Pike <robpike@gmail.com>
|
||||
Roger Peppe <rogpeppe@gmail.com>
|
||||
Russ Cox <rsc@swtch.com>
|
||||
Sean McKean <smckean83@gmail.com>
|
||||
Shenghou Ma <minux.ma@gmail.com>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue