• Arkadiusz Hiler's avatar
    winex11.drv: Send missed KEYUP events on KeymapNotify. · 2bfe81e4
    Arkadiusz Hiler authored
    Full focus lost / focus gained events on the Windows side are not
    feasible for X11's FocusIn/FocusOut events generated by keyboard grabs
    (see XGrabKeyboard()) that are used for example for Atl+Tab handling.
    Using them would degrade user's experience by causing the window to
    minimize or flash multiple times depending on a game/window manager
    combo.
    
    Because of that the programs may miss on some KEYUP events that happen
    during the grab, and since there are no focus changes on the Windows
    side the state doesn't get resynced.
    
    This change attempts to improve user experience by syncing any missed
    key release events that happened while the window haven't had focus on
    the X11 side.
    
    There's no syncing of key presses as those are more problematic because
    of window manager quirks, e.g. on KDE it may end up syncing the Tab
    press portion of Alt+Tab. Luckily missing key events for keys that were
    pressed and not released while the WM had the keyboard grab is not
    nearly as confusing as stuck keys.
    
    For Warhammer: Chaosbane, theHunter: Call of the Wild, Far Cry Primal
    and many other games that end up with stuck Alt after Alt+Tabbing.
    2bfe81e4
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...