Replaced repeat kluge with detectable auto repeat.

This commit is contained in:
Camilla Berglund
2013-01-12 21:01:44 +01:00
parent 6a4c175816
commit fcb96967ba
3 changed files with 13 additions and 27 deletions
+10
View File
@@ -470,6 +470,8 @@ static void detectEWMH(void)
static GLboolean initDisplay(void)
{
Bool supported;
_glfw.x11.display = XOpenDisplay(NULL);
if (!_glfw.x11.display)
{
@@ -528,6 +530,14 @@ static GLboolean initDisplay(void)
return GL_FALSE;
}
XkbSetDetectableAutoRepeat(_glfw.x11.display, True, &supported);
if (!supported)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"X11: Detectable key repeat is not available");
return GL_FALSE;
}
// Update the key code LUT
// FIXME: We should listen to XkbMapNotify events to track changes to
// the keyboard mapping.