sdl2_frt/src
Ryan C. Gordon f59b0056d3 evdev: On sudden termination, make sure keyboard isn't lost (thanks, Tadek!)
"In release 2.0.6, when Linux evdev keyboard support has been moved to a
separate source file, a feature was added to disable normal keyboard event
processing to prevent "spilling" keystrokes to background virtual console.

This feature has one unpleasant side effect: if application fails to call
`SDL_Exit` before termination or crashes with fatal signal, console is left
in unusable state with keyboard not working and no possibility to switch
virtual console. If user has a chance, he can login remotely and restore
keyboard with `kbd_mode`, otherwise the only option is to reboot the machine.

This patch fixes that problem by intercepting fatal signals (with `sigaction`)
and process termination (with `atexit`), to restore keyboard state, if it
wasn't properly restored with `SDL_Exit`.

The function registered with `atexit` also restores original signal handlers,
to prevent leaving invalid handlers after SDL library is unloaded, if it was
loaded dynamically with `dlopen`.

No signal handlers or `atexit` function are installed if SDL boolean hint
`SDL_HINT_NO_SIGNAL_HANDLERS` is `SDL_TRUE`.

Additionally, if environment variable `SDL_INPUT_LINUX_KEEP_KBD` exists,
keyboard initialization function completely skips disabling keyboard. This
can be useful for debugging."

Fixes Bugzilla #4193.
2018-08-07 16:56:46 -04:00
..
atomic correct the comment correction.. 2018-06-30 20:10:40 +03:00
audio alsa: optionally run entire pipeline non-blocking. 2018-08-07 16:49:18 -04:00
core evdev: On sudden termination, make sure keyboard isn't lost (thanks, Tadek!) 2018-08-07 16:56:46 -04:00
cpuinfo cpuinfo: Added SDL_HasAVX512F(). 2018-05-21 11:35:42 -04:00
dynapi SDL_exp 2018-08-04 11:52:46 -04:00
events Some drag'and'drop improvements. 2018-08-02 16:03:47 -04:00
file
filesystem
haptic haptic: Fix initial detection of haptic devices on Linux system 2018-08-07 12:06:31 -04:00
joystick Backed out changeset 794a209b2270 2018-08-06 13:00:11 -07:00
libm SDL_exp 2018-08-04 11:52:46 -04:00
loadso
main
power Handle NULL return from SDL_DBus_GetContext() 2018-04-23 20:24:12 -07:00
render gles2: Whoops, overzealous copy/paste on my part. :) 2018-06-25 01:57:28 -04:00
stdlib SDL_expf: return SDL_exp() instead of SDL_uclibc_exp() for consistency. 2018-08-05 10:01:01 +03:00
test Some drag'and'drop improvements. 2018-08-02 16:03:47 -04:00
thread thread: fixed compiler warnings on non-Linux systems that use pthread. 2018-05-21 12:00:21 -04:00
timer
video Some drag'and'drop improvements. 2018-08-02 16:03:47 -04:00
SDL_assert_c.h
SDL_assert.c use the 'aborts' pragma of Watcom for SDL_NORETURN functions 2018-06-13 14:45:02 +03:00
SDL_dataqueue.c
SDL_dataqueue.h
SDL_error_c.h
SDL_error.c
SDL_hints.c
SDL_internal.h
SDL_log.c
SDL.c