From 9fe6f16af3d1449c793f2fe032bf408189c01c47 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Sun, 11 Jun 2017 14:32:37 +0200 Subject: [PATCH] compositor: provide default noop impls from Handler --- src/compositor/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compositor/mod.rs b/src/compositor/mod.rs index 7757352..d62da0c 100644 --- a/src/compositor/mod.rs +++ b/src/compositor/mod.rs @@ -330,10 +330,12 @@ impl CompositorHandler { /// The global provided by Smithay cannot process these events for you, so they /// are forwarded directly to a handler implementing this trait that you must provide /// at creation of the `CompositorHandler`. +#[allow(unused_variables)] pub trait Handler { /// See `wayland_server::protocol::wl_surface::Handler::commit` - fn commit(&mut self, evlh: &mut EventLoopHandle, client: &Client, surface: &wl_surface::WlSurface); + fn commit(&mut self, evlh: &mut EventLoopHandle, client: &Client, surface: &wl_surface::WlSurface) {} /// See `wayland_server::protocol::wl_surface::Handler::frame` fn frame(&mut self, evlh: &mut EventLoopHandle, client: &Client, surface: &wl_surface::WlSurface, - callback: wl_callback::WlCallback); + callback: wl_callback::WlCallback) { + } }