Don't force keyboard auto-repeat on, if the user has disabled it for some reason

Fixes https://github.com/libsdl-org/SDL/issues/2400
This commit is contained in:
Sam Lantinga 2022-04-26 10:19:03 -07:00
parent 795744fc75
commit 01ef98a5d0
2 changed files with 0 additions and 10 deletions

View File

@ -267,13 +267,6 @@ X11_InitKeyboard(_THIS)
int best_index;
int distance;
Bool xkb_repeat = 0;
XKeyboardState values;
SDL_zero(values);
values.global_auto_repeat = AutoRepeatModeOff;
X11_XGetKeyboardControl(data->display, &values);
if (values.global_auto_repeat != AutoRepeatModeOn)
X11_XAutoRepeatOn(data->display);
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
{

View File

@ -33,8 +33,6 @@ SDL_X11_MODULE(BASEXLIB)
SDL_X11_SYM(XSizeHints*,XAllocSizeHints,(void),(),return)
SDL_X11_SYM(XWMHints*,XAllocWMHints,(void),(),return)
SDL_X11_SYM(XClassHint*,XAllocClassHint,(void),(),return)
SDL_X11_SYM(int,XAutoRepeatOn,(Display* a),(a),return)
SDL_X11_SYM(int,XAutoRepeatOff,(Display* a),(a),return)
SDL_X11_SYM(int,XChangePointerControl,(Display* a,Bool b,Bool c,int d,int e,int f),(a,b,c,d,e,f),return)
SDL_X11_SYM(int,XChangeProperty,(Display* a,Window b,Atom c,Atom d,int e,int f,_Xconst unsigned char* g,int h),(a,b,c,d,e,f,g,h),return)
SDL_X11_SYM(Bool,XCheckIfEvent,(Display* a,XEvent *b,Bool (*c)(Display*,XEvent*,XPointer),XPointer d),(a,b,c,d),return)
@ -72,7 +70,6 @@ SDL_X11_SYM(char*,XGetAtomName,(Display *a,Atom b),(a,b),return)
SDL_X11_SYM(int,XGetInputFocus,(Display *a,Window *b,int *c),(a,b,c),return)
SDL_X11_SYM(int,XGetErrorDatabaseText,(Display* a,_Xconst char* b,_Xconst char* c,_Xconst char* d,char* e,int f),(a,b,c,d,e,f),return)
SDL_X11_SYM(XModifierKeymap*,XGetModifierMapping,(Display* a),(a),return)
SDL_X11_SYM(int,XGetKeyboardControl,(Display* a, XKeyboardState* b),(a,b),return)
SDL_X11_SYM(int,XGetPointerControl,(Display* a,int* b,int* c,int* d),(a,b,c,d),return)
SDL_X11_SYM(Window,XGetSelectionOwner,(Display* a,Atom b),(a,b),return)
SDL_X11_SYM(XVisualInfo*,XGetVisualInfo,(Display* a,long b,XVisualInfo* c,int* d),(a,b,c,d),return)