xlib: keep track of modifiers and generate events on focus
xlib: keep track of modifiers and generate events on focus

This is required to prevent stuck keys if modifiers are pressed while
unfocusing.  This should theoretically be ensured by the responsible
window manager, but many do not handle this.

courtc/zdl,courtc/zdl