Update smithay to latest commit
Includes an implementation for `VirtualKeyboardHandler`, which is now required.
This commit is contained in:
parent
1dfc948f1e
commit
0f7e53b600
3 changed files with 52 additions and 22 deletions
|
|
@ -1,6 +1,35 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use crate::state::State;
|
||||
use smithay::delegate_virtual_keyboard_manager;
|
||||
use smithay::{
|
||||
backend::input::KeyState,
|
||||
delegate_virtual_keyboard_manager,
|
||||
input::keyboard::{FilterResult, KeyboardHandle, Keycode, xkb::ModMask},
|
||||
utils::SERIAL_COUNTER,
|
||||
wayland::virtual_keyboard::VirtualKeyboardHandler,
|
||||
};
|
||||
|
||||
impl VirtualKeyboardHandler for State {
|
||||
fn on_keyboard_event(
|
||||
&mut self,
|
||||
keycode: Keycode,
|
||||
state: KeyState,
|
||||
time: u32,
|
||||
keyboard: KeyboardHandle<Self>,
|
||||
) {
|
||||
let serial = SERIAL_COUNTER.next_serial();
|
||||
keyboard.input(self, keycode, state, serial, time, |_, _, _| {
|
||||
FilterResult::Forward::<bool>
|
||||
});
|
||||
}
|
||||
fn on_keyboard_modifiers(
|
||||
&mut self,
|
||||
_depressed_mods: ModMask,
|
||||
_latched_mods: ModMask,
|
||||
_locked_mods: ModMask,
|
||||
_keyboard: KeyboardHandle<Self>,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
delegate_virtual_keyboard_manager!(State);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue