Fix udev example
This commit is contained in:
parent
40ef1236ea
commit
5f59ded3f0
|
@ -4,7 +4,7 @@ extern crate glium;
|
|||
extern crate rand;
|
||||
extern crate input as libinput;
|
||||
extern crate image;
|
||||
extern crate libudev;
|
||||
extern crate udev;
|
||||
#[macro_use(define_roles)]
|
||||
extern crate smithay;
|
||||
extern crate xkbcommon;
|
||||
|
@ -201,7 +201,7 @@ fn main() {
|
|||
/*
|
||||
* Initialize the udev backend
|
||||
*/
|
||||
let context = libudev::Context::new().unwrap();
|
||||
let context = udev::Context::new().unwrap();
|
||||
let bytes = include_bytes!("resources/cursor2.rgba");
|
||||
let udev_token
|
||||
= UdevBackend::new(&mut event_loop, &context, session.clone(), UdevHandlerImpl {
|
||||
|
|
|
@ -147,7 +147,7 @@ impl<B: From<DrmBackend> + Borrow<DrmBackend> + 'static, H: DrmHandler<B> + 'sta
|
|||
/// Make sure not to borrow any tokens twice.
|
||||
pub fn close<'a, ST: Into<StateProxy<'a>>>(mut self, state: ST) {
|
||||
let mut state = state.into();
|
||||
for (_, (mut device, event_source)) in self.devices.drain() {
|
||||
for (_, (device, event_source)) in self.devices.drain() {
|
||||
event_source.remove();
|
||||
self.handler.device_removed(&mut state, &device);
|
||||
let device = state.remove(device);
|
||||
|
|
Loading…
Reference in New Issue