mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
af5d92708d
UI key presses are still handled by regular X events, but in-game "button" presses arrive via raw keyboard events. This gives transparent handling of keyboard repeat (UI keys see repeat, game keys do not), without messing with the server's settings (yay, that was most annoying when it came to debugging), and the keyboard is never grabbed, so this is a fairly user-friendly setup. At first, I wasn't too keen on capturing them from the root window (thinking about the user's security), but after a lot of investigation, I found a post by Peter Hutterer (http://who-t.blogspot.com/2011/09/whats-new-in-xi-21-raw-events.html) commenting that root window events were added to XInput2 specifically for games. Since application focus is tracked and unfocused key events are dropped very early on, there's no way for code further down the food-chain to know there even was an event, abusing the access would require modifying the x11 input code, in which case all bets are off anyway and any attempt at security anywhere in the code will fail, meaning that nefarious progs code and the like shouldn't be a problem. |
||
---|---|---|
.. | ||
context_sdl.c | ||
context_win.c | ||
context_x11.c | ||
dga_check.c | ||
fbset.c | ||
fbset_modes_l.l | ||
fbset_modes_y.y | ||
in_fbdev.c | ||
in_sdl.c | ||
in_svgalib.c | ||
in_win.c | ||
in_x11.c | ||
joy.c | ||
joy_linux.c | ||
joy_null.c | ||
joy_win.c | ||
Makemodule.am | ||
vid.c | ||
vid_3dfxsvga.c | ||
vid_fbdev.c | ||
vid_sdl.c | ||
vid_sdl_gl.c | ||
vid_sdl_sw.c | ||
vid_svgalib.c | ||
vid_win.c | ||
vid_win_gl.c | ||
vid_win_sw.c | ||
vid_win_vulkan.c | ||
vid_x11.c | ||
vid_x11_gl.c | ||
vid_x11_sw.c | ||
vid_x11_vulkan.c |