ref: 7b58000c3d019d157fa5f1cc5621b0923e5b8539
parent: c6e961742048ed15b07d7a8aa78df590852cdc7f
author: Sigrid <[email protected]>
date: Wed Apr 14 16:46:13 EDT 2021
x11: reset Kshift state on focus change until we find a way to reset all modifier keys state
--- a/gui-x11/x11.c
+++ b/gui-x11/x11.c
@@ -768,6 +768,7 @@
xkeyboard(XEvent *e)
{
static int altdown;
+ static int shiftdown;
KeySym k;
switch(e->xany.type){
@@ -782,6 +783,10 @@
kbdkey(Kalt, 1);
kbdkey(Kalt, 0);
}
+ if(shiftdown){
+ shiftdown = 0;
+ kbdkey(Kshift, 0);
+ }
/* wet floor */
default:
return;
@@ -922,6 +927,7 @@
if(k == NoSymbol)
return;
altdown = e->xany.type == KeyPress && k == Kalt;
+ shiftdown = e->xany.type == KeyPress && k == Kshift;
kbdkey(k, e->xany.type == KeyPress);
}