diff --git a/src/platform_impl/linux/wayland/keyboard.rs b/src/platform_impl/linux/wayland/keyboard.rs index 4002603d..727062ad 100644 --- a/src/platform_impl/linux/wayland/keyboard.rs +++ b/src/platform_impl/linux/wayland/keyboard.rs @@ -127,11 +127,12 @@ pub fn init_keyboard( // In this case, we don't have the keymap information (it is // supposed to be serialized by the compositor using libxkbcommon) - // { variables to be captured by the closure - let mut target = None; - let my_sink = sink; - // } seat.get_keyboard(|keyboard| { + // { variables to be captured by the closure + let mut target = None; + let my_sink = sink; + // } + keyboard.implement_closure( move |evt, _| match evt { wl_keyboard::Event::Enter { surface, .. } => { diff --git a/src/platform_impl/linux/wayland/pointer.rs b/src/platform_impl/linux/wayland/pointer.rs index b5ec7e3c..7ffcdd72 100644 --- a/src/platform_impl/linux/wayland/pointer.rs +++ b/src/platform_impl/linux/wayland/pointer.rs @@ -23,12 +23,12 @@ pub fn implement_pointer( store: Arc>, modifiers_tracker: Arc>, ) -> WlPointer { - let mut mouse_focus = None; - let mut axis_buffer = None; - let mut axis_discrete_buffer = None; - let mut axis_state = TouchPhase::Ended; - seat.get_pointer(|pointer| { + let mut mouse_focus = None; + let mut axis_buffer = None; + let mut axis_discrete_buffer = None; + let mut axis_state = TouchPhase::Ended; + pointer.implement_closure( move |evt, pointer| { let mut sink = sink.lock().unwrap(); diff --git a/src/platform_impl/linux/wayland/window.rs b/src/platform_impl/linux/wayland/window.rs index ac0ca2a8..773af760 100644 --- a/src/platform_impl/linux/wayland/window.rs +++ b/src/platform_impl/linux/wayland/window.rs @@ -1,6 +1,5 @@ use std::{ collections::VecDeque, - io::{Seek, SeekFrom, Write}, sync::{Arc, Mutex, Weak}, }; @@ -18,8 +17,8 @@ use crate::{ use smithay_client_toolkit::{ output::OutputMgr, reexports::client::{ - protocol::{wl_seat, wl_shm, wl_subsurface, wl_surface}, - Display, NewProxy, + protocol::{wl_seat, wl_surface}, + Display, }, surface::{get_dpi_factor, get_outputs}, window::{ConceptFrame, Event as WEvent, State as WState, Theme, Window as SWindow},