skelterjohn / go.wde

Windows, drawing and events for Go
217 stars 46 forks source link

xgb: modifiers "stick" if the key is released outside wde's window #34

Closed rowanworth closed 9 years ago

rowanworth commented 11 years ago

Can reproduce with the wdetest program (probably requires sloppy-focus):

1) give focus to a wde window 2) press (and hold) the left_super key 3) move the mouse out of the wde window and give focus to a different window 4) release the super key

Subsequent keypresses in the originally-focused wde window report "super" as part of the chord.

sqweek commented 11 years ago

That's me by the way, had my work github account logged in.

sqweek commented 11 years ago

OK we get an XKeymapNotify event when we regain focus that tells us the keystate, so can use that to keep the downKeys map in sync.

I'm working on a patch, do you want to generate wde.KeyEvent/wde.KeyUpEvent to match the changes to the keyboard state? It's a bit more work, but I think it makes sense to do so.

sqweek commented 9 years ago

Fixed by #40