config: allow handling switch events
This commit is contained in:
parent
55d55bf161
commit
cf233abb5a
21 changed files with 443 additions and 27 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use {
|
||||
crate::{
|
||||
backend::KeyState,
|
||||
backend::{InputDeviceId, KeyState},
|
||||
client::Client,
|
||||
fixed::Fixed,
|
||||
ifs::wl_seat::{wl_pointer::PendingScroll, SeatId},
|
||||
|
|
@ -220,6 +220,22 @@ impl JaySeatEvents {
|
|||
cancelled: cancelled as _,
|
||||
});
|
||||
}
|
||||
|
||||
pub fn send_switch_event(
|
||||
&self,
|
||||
seat: SeatId,
|
||||
input_device: InputDeviceId,
|
||||
time_usec: u64,
|
||||
event: jay_config::input::SwitchEvent,
|
||||
) {
|
||||
self.client.event(SwitchEvent {
|
||||
self_id: self.id,
|
||||
seat: seat.raw(),
|
||||
time_usec,
|
||||
input_device: input_device.raw(),
|
||||
event: event as _,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
impl JaySeatEventsRequestHandler for JaySeatEvents {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue