diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-07-18 19:03:13 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-07-18 19:03:13 +0200 |
commit | 7d1d035d9ad5d262a67c6857596caefe957dcfda (patch) | |
tree | e1d1181d0a1d5a69730338d3d800cd30dde9d1b9 /src/api/x11/xdisplay.rs | |
parent | c1ebb8cf310947d7771c51c4949acedb19c41ee0 (diff) | |
parent | d960753360fdc70e94ce2633db1e03d5ddc7b657 (diff) | |
download | glutin-7d1d035d9ad5d262a67c6857596caefe957dcfda.tar.gz glutin-7d1d035d9ad5d262a67c6857596caefe957dcfda.zip |
Merge pull request #510 from robertknight/x11_xinput2
Use XInput2 for event handling
Diffstat (limited to 'src/api/x11/xdisplay.rs')
-rw-r--r-- | src/api/x11/xdisplay.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/x11/xdisplay.rs b/src/api/x11/xdisplay.rs index 9037155..2576b74 100644 --- a/src/api/x11/xdisplay.rs +++ b/src/api/x11/xdisplay.rs @@ -12,6 +12,7 @@ pub struct XConnection { pub xlib: ffi::Xlib, pub xf86vmode: ffi::Xf86vmode, pub xcursor: ffi::Xcursor, + pub xinput2: ffi::XInput2, pub glx: Option<ffi::glx::Glx>, pub egl: Option<Egl>, pub display: *mut ffi::Display, @@ -30,6 +31,7 @@ impl XConnection { let xlib = try!(ffi::Xlib::open().map_err(|_| XNotSupported)); let xcursor = try!(ffi::Xcursor::open().map_err(|_| XNotSupported)); let xf86vmode = try!(ffi::Xf86vmode::open().map_err(|_| XNotSupported)); + let xinput2 = try!(ffi::XInput2::open().map_err(|_| XNotSupported)); unsafe extern "C" fn x_error_callback(_: *mut ffi::Display, event: *mut ffi::XErrorEvent) -> libc::c_int @@ -86,6 +88,7 @@ impl XConnection { xlib: xlib, xf86vmode: xf86vmode, xcursor: xcursor, + xinput2: xinput2, glx: glx, egl: egl, display: display, |