From bcd3da1fcd802330817bb0795f5a563ca093409b Mon Sep 17 00:00:00 2001 From: Evan Tatarka Date: Sun, 14 Sep 2014 18:12:37 -0400 Subject: make x11 keyboard repeat detectable --- src/x11/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/x11/mod.rs') diff --git a/src/x11/mod.rs b/src/x11/mod.rs index 0710544..1b1e116 100644 --- a/src/x11/mod.rs +++ b/src/x11/mod.rs @@ -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(); -- cgit v1.2.3