diff --git a/examples/drm.rs b/examples/drm.rs index 30a064a..325f0fb 100644 --- a/examples/drm.rs +++ b/examples/drm.rs @@ -34,6 +34,7 @@ use std::os::unix::io::AsRawFd; use std::os::unix::io::RawFd; use std::rc::Rc; use std::time::Duration; +use wayland_server::EventLoopHandle; #[derive(Debug)] pub struct Card(File); @@ -165,7 +166,7 @@ pub struct DrmHandlerImpl { impl DrmHandler for DrmHandlerImpl { fn ready( - &mut self, _device: &mut DrmDevice, _crtc: crtc::Handle, _frame: u32, _duration: Duration + &mut self, _evlh: &mut EventLoopHandle, _device: &mut DrmDevice, _crtc: crtc::Handle, _frame: u32, _duration: Duration ) { let mut frame = self.drawer.draw(); frame.clear_color(0.8, 0.8, 0.9, 1.0); @@ -245,7 +246,7 @@ impl DrmHandler for DrmHandlerImpl { frame.finish().unwrap(); } - fn error(&mut self, _device: &mut DrmDevice, error: DrmError) { + fn error(&mut self, _evlh: &mut EventLoopHandle, _device: &mut DrmDevice, error: DrmError) { panic!("{:?}", error); } } diff --git a/examples/udev.rs b/examples/udev.rs index 15accb2..e0ae6b5 100644 --- a/examples/udev.rs +++ b/examples/udev.rs @@ -506,7 +506,7 @@ pub struct DrmHandlerImpl { impl DrmHandler for DrmHandlerImpl { fn ready( - &mut self, _device: &mut DrmDevice, crtc: crtc::Handle, _frame: u32, + &mut self, _evlh: &mut EventLoopHandle, _device: &mut DrmDevice, crtc: crtc::Handle, _frame: u32, _duration: Duration, ) { if let Some(drawer) = self.backends.borrow().get(&crtc) { @@ -597,7 +597,7 @@ impl DrmHandler for DrmHandlerImpl { } } - fn error(&mut self, _device: &mut DrmDevice, error: DrmError) { + fn error(&mut self, _evlh: &mut EventLoopHandle, _device: &mut DrmDevice, error: DrmError) { error!(self.logger, "{:?}", error); } } diff --git a/src/backend/drm/mod.rs b/src/backend/drm/mod.rs index a0eccde..294cd73 100644 --- a/src/backend/drm/mod.rs +++ b/src/backend/drm/mod.rs @@ -139,6 +139,7 @@ //! # use std::time::Duration; //! use smithay::backend::drm::{DrmDevice, DrmBackend, DrmHandler, drm_device_bind}; //! use smithay::backend::graphics::egl::EGLGraphicsBackend; +//! use wayland_server::EventLoopHandle; //! # //! # #[derive(Debug)] //! # pub struct Card(File); @@ -180,6 +181,7 @@ //! impl DrmHandler for MyDrmHandler { //! fn ready( //! &mut self, +//! _evlh: &mut EventLoopHandle, //! _device: &mut DrmDevice, //! _crtc: CrtcHandle, //! _frame: u32, @@ -190,6 +192,7 @@ //! } //! fn error( //! &mut self, +//! _evlh: &mut EventLoopHandle, //! device: &mut DrmDevice, //! error: DrmError) //! {