mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
fix the *nix x11 keyboard repeat issues
This commit is contained in:
parent
b4c9dcc7fb
commit
b3cd4355cf
1 changed files with 10 additions and 0 deletions
|
@ -82,6 +82,8 @@ cvar_t *in_dga_mouseaccel;
|
|||
static qboolean dga_avail;
|
||||
static qboolean dga_active;
|
||||
|
||||
static keydest_t old_key_dest = key_none;
|
||||
|
||||
static qboolean mouse_avail;
|
||||
static float mouse_x, mouse_y;
|
||||
static float old_mouse_x, old_mouse_y;
|
||||
|
@ -306,6 +308,14 @@ XLateKey (XKeyEvent * ev, qboolean modified)
|
|||
static void
|
||||
event_key (XEvent * event)
|
||||
{
|
||||
if (old_key_dest != key_dest) {
|
||||
old_key_dest = key_dest;
|
||||
if (key_dest == key_game) {
|
||||
XAutoRepeatOff (x_disp);
|
||||
} else {
|
||||
XAutoRepeatOn (x_disp);
|
||||
}
|
||||
}
|
||||
Key_Event (XLateKey (&event->xkey, 0), XLateKey (&event->xkey, 1),
|
||||
event->type == KeyPress);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue