• 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
..
Makefile.in Loading commit data...
bitblt.c Loading commit data...
brush.c Loading commit data...
clipboard.c Loading commit data...
desktop.c Loading commit data...
display.c Loading commit data...
dllmain.c Loading commit data...
event.c Loading commit data...
graphics.c Loading commit data...
init.c Loading commit data...
keyboard.c Loading commit data...
mouse.c Loading commit data...
mwm.h Loading commit data...
opengl.c Loading commit data...
palette.c Loading commit data...
pen.c Loading commit data...
systray.c Loading commit data...
unixlib.h Loading commit data...
version.rc Loading commit data...
vulkan.c Loading commit data...
window.c Loading commit data...
winex11.drv.spec Loading commit data...
wintab.c Loading commit data...
x11drv.h Loading commit data...
x11drv_dll.h Loading commit data...
x11drv_main.c Loading commit data...
xcomposite.h Loading commit data...
xdnd.c Loading commit data...
xim.c Loading commit data...
xinerama.c Loading commit data...
xrandr.c Loading commit data...
xrender.c Loading commit data...
xvidmode.c Loading commit data...