Fixed bug #1650: X11 doesn't set KMOD_NUM and KMOD_CAPS to system state

This commit is contained in:
Sylvain 2022-03-24 18:09:45 +01:00
parent 2398c43be2
commit 6c56193a2a
No known key found for this signature in database
GPG Key ID: 5F87E02E5BC0939E
3 changed files with 4 additions and 1 deletions

View File

@ -380,7 +380,7 @@ X11_GetScrollLockModifierMask(_THIS)
return num_mask; return num_mask;
} }
static void void
X11_ReconcileKeyboardState(_THIS) X11_ReconcileKeyboardState(_THIS)
{ {
SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata;

View File

@ -27,6 +27,7 @@ extern void X11_PumpEvents(_THIS);
extern int X11_WaitEventTimeout(_THIS, int timeout); extern int X11_WaitEventTimeout(_THIS, int timeout);
extern void X11_SendWakeupEvent(_THIS, SDL_Window *window); extern void X11_SendWakeupEvent(_THIS, SDL_Window *window);
extern void X11_SuspendScreenSaver(_THIS); extern void X11_SuspendScreenSaver(_THIS);
extern void X11_ReconcileKeyboardState(_THIS);
#endif /* SDL_x11events_h_ */ #endif /* SDL_x11events_h_ */

View File

@ -409,6 +409,8 @@ X11_InitKeyboard(_THIS)
SDL_IME_Init(); SDL_IME_Init();
#endif #endif
X11_ReconcileKeyboardState(_this);
return 0; return 0;
} }