HomeWildfire Games

Fix 0 A.D. quitting 'too fast' when it gains focus after alt+F4

Description

Fix 0 A.D. quitting 'too fast' when it gains focus after alt+F4

There appears to be an SDL issue with linux and X11 that causes Keydown events to be sent immediately when 0 A.D. gains focus. This can loead to Alt-F4 quitting 0 A.D. immediately upon focus gain, such as when another application was quit via Alt-F4.

The typical bug case was:

  • Open 0 A.D.
  • Open another app
  • Alt-F4 other app
  • 0 A.D. immediately receives alt-F4 as well and exits.

Since SLD handles this hotkey natively via SDL_QUIT, it seems easier to default to "no hotkey", as that fixes the problem.

Reported by: Imarok

Fixes #6092

Differential Revision: https://code.wildfiregames.com/D4132