Camilla Berglund 9 年 前
コミット
067d1d6935
2 ファイル変更6 行追加8 行削除
  1. 2 4
      src/x11_platform.h
  2. 4 4
      src/x11_window.c

+ 2 - 4
src/x11_platform.h

@@ -123,10 +123,8 @@ typedef struct _GLFWwindowX11
     int             warpCursorPosX, warpCursorPosY;
 
     // The information from the last KeyPress event
-    struct {
-        unsigned int keycode;
-        Time         time;
-    } last;
+    unsigned int    lastKeyCode;
+    Time            lastKeyTime;
 
 } _GLFWwindowX11;
 

+ 4 - 4
src/x11_window.c

@@ -960,15 +960,15 @@ static void processEvent(XEvent *event)
                 // HACK: Ignore duplicate key press events generated by ibus
                 //       Corresponding release events are filtered out by the
                 //       GLFW key repeat logic
-                if (window->x11.last.keycode != keycode ||
-                    window->x11.last.time != event->xkey.time)
+                if (window->x11.lastKeyCode != keycode ||
+                    window->x11.lastKeyTime != event->xkey.time)
                 {
                     if (keycode)
                         _glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
                 }
 
-                window->x11.last.keycode = keycode;
-                window->x11.last.time = event->xkey.time;
+                window->x11.lastKeyCode = keycode;
+                window->x11.lastKeyTime = event->xkey.time;
 
                 if (!filtered)
                 {