1
0
Fork 0
forked from wry/wry

keyboard: use kbvm::Components

This commit is contained in:
Julian Orth 2025-01-07 11:53:00 +01:00
parent e7d5a23af3
commit 51ceba72b0
10 changed files with 106 additions and 44 deletions

View file

@ -2,13 +2,14 @@ use {
crate::{
client::ClientError,
ifs::wl_seat::WlSeat,
keyboard::{KeyboardState, KeyboardStateId, ModifierState},
keyboard::{KeyboardState, KeyboardStateId},
leaks::Tracker,
object::{Object, Version},
utils::errorfmt::ErrorFmt,
wire::{wl_keyboard::*, WlKeyboardId, WlSurfaceId},
xkbcommon::XkbCommonError,
},
kbvm::Components,
std::{cell::Cell, rc::Rc},
thiserror::Error,
};
@ -138,14 +139,14 @@ impl WlKeyboard {
}
}
fn send_modifiers(&self, serial: u64, mods: &ModifierState) {
fn send_modifiers(&self, serial: u64, mods: &Components) {
self.seat.client.event(Modifiers {
self_id: self.id,
serial: serial as _,
mods_depressed: mods.mods_depressed,
mods_latched: mods.mods_latched,
mods_locked: mods.mods_locked,
group: mods.group,
mods_depressed: mods.mods_pressed.0,
mods_latched: mods.mods_latched.0,
mods_locked: mods.mods_locked.0,
group: mods.group.0,
})
}