make x11 keyboard repeat detectable

This commit is contained in:
Evan Tatarka 2014-09-14 18:12:37 -04:00
parent 485e89715f
commit bcd3da1fcd
2 changed files with 13 additions and 1 deletions

View file

@ -179,6 +179,16 @@ impl Window {
ic
};
// Attempt to make keyboard input repeat detectable
unsafe {
let mut supported_ptr = false;
ffi::XkbSetDetectableAutoRepeat(display, true, &mut supported_ptr);
if !supported_ptr {
return Err(format!("XkbSetDetectableAutoRepeat failed"));
}
}
// creating GL context
let context = unsafe {
let mut attributes = Vec::new();