Resolution of X11 key-repeat handling
[freeglut] / src / freeglut_state.c
index 9dc38fb..0ea47a4 100644 (file)
@@ -507,7 +507,7 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat )
 
     case GLUT_HAS_MOUSE:
         /*
-         * The Windows can be booted without a mouse. 
+         * The Windows can be booted without a mouse.
          * It would be nice to have this reported.
          */
         return GetSystemMetrics( SM_MOUSEPRESENT );
@@ -542,7 +542,7 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat )
         return 0;
 
     case GLUT_DEVICE_IGNORE_KEY_REPEAT:
-        return fgState.IgnoreKeyRepeat;
+        return fgStructure.Window ? fgStructure.Window->State.IgnoreKeyRepeat : 0;
 
     case GLUT_DEVICE_KEY_REPEAT:
         /*