Skip to content

SDL_x11events.c: properly handle input focus events

The Xorg xserver changed to send focus events on grab changes in [1]. This patch backports upstream changes [2] and [3] from libsdl2 to libsdl1.2 to properly handle (ignore) those events. Without this patch the focus events will interfere with keyboard handling and cause e.g. sudden stop in games while the forward key is still being pressed.

[1] https://cgit.freedesktop.org/xorg/xserver/commit/?id=c67f2eac56518163981af59f5accb7c79bc00f6a [2] https://hg.libsdl.org/SDL/rev/a1c4c17410e8 [3] https://hg.libsdl.org/SDL/rev/764129077d18

This is a cherry-pick of the upstream fix from the SDL-1.2 branch: https://hg.libsdl.org/SDL/rev/336bcaa9432c

Merge request reports

Loading