Replaced XAutoRepeatOff by XkbSetDetectableAutoRepeat, because the former must be reset before the program exits (and this is not always possible).

This commit is contained in:
the_fiddler 2009-05-30 21:41:45 +00:00
parent 4334ab38e7
commit 93f6050fe6

View file

@ -78,7 +78,12 @@ namespace OpenTK.Platform.X11
keyboard.DeviceID = IntPtr.Zero;
dummy_keyboard_list.Add(keyboard);
Functions.XAutoRepeatOff(window.Display);
// Request that auto-repeat is only set on devices that support it physically.
// This typically means that it's turned off for keyboards (which is what we want).
// We prefer this method over XAutoRepeatOff/On, because the latter needs to
// be reset before the program exits.
bool supported;
Functions.XkbSetDetectableAutoRepeat(window.Display, true, out supported);
Debug.Unindent();
}