pub fn button(&self, button: u32, state: ButtonState, serial: Serial, time: u32) {
        let mut inner = self.inner.borrow_mut();
        match state {
            ButtonState::Pressed => {
                inner.pressed_buttons.push(button);
            }
            ButtonState::Released => {
                inner.pressed_buttons.retain(|b| *b != button);
            }
            _ => unreachable!(),
        }
        inner.with_grab(|mut handle, grab| {
            grab.button(&mut handle, button, state, serial, time);
        });
    }
/// Notify that a button was pressed
///
/// This will internally send the appropriate button event to the client
/// objects matching with the currently focused surface.
Notify that a button was pressed
This will internally send the appropriate button event to the client
objects matching with the currently focused surface.
Notify that a button was pressed This will internally send the appropriate button event to the client objects matching with the currently focused surface .
pub fn button(&self, button: u32, state: ButtonState, serial: Serial, time: u32) {
        let mut inner = self.inner.borrow_mut();
        match state {
            ButtonState::Pressed => {
                inner.pressed_buttons.push(button);
            }
            ButtonState::Released => {
                inner.pressed_buttons.retain(|b| *b != button);
            }
            _ => unreachable!(),
        }
        inner.with_grab(|mut handle, grab| {
            grab.button(&mut handle, button, state, serial, time);
        });
    }
pub fn button ( & self , button : u32 , state : ButtonState , serial : Serial , time : u32 ) { let mut inner = self . inner . borrow_mut ( ) ; match state { ButtonState :: Pressed => { inner . pressed_buttons . push ( button ) ; } ButtonState :: Released => { inner . pressed_buttons . retain ( | b | * b != button ) ; } _ => unreachable ! ( ) , } inner . with_grab ( | mut handle , grab | { grab . button ( & mut handle , button , state , serial , time ) ; } ) ; }
Notify that a button was pressed
This will internally send the appropriate button event to the client
objects matching with the currently focused surface.
Notify that a button was pressed This will internally send the appropriate button event to the client objects matching with the currently focused surface .
&self
button
u32
state
ButtonState
serial
Serial
time
u32
&self
button
u32
state
ButtonState
serial
Serial
time
u32