瀏覽代碼

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

Sylvain 3 年之前
父節點
當前提交
6c56193a2a
共有 3 個文件被更改,包括 4 次插入1 次删除
  1. 1 1
      src/video/x11/SDL_x11events.c
  2. 1 0
      src/video/x11/SDL_x11events.h
  3. 2 0
      src/video/x11/SDL_x11keyboard.c

+ 1 - 1
src/video/x11/SDL_x11events.c

@@ -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;

+ 1 - 0
src/video/x11/SDL_x11events.h

@@ -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_ */
 
 

+ 2 - 0
src/video/x11/SDL_x11keyboard.c

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