1
0
Fork 0
forked from wry/wry

config: allow handling switch events

This commit is contained in:
Julian Orth 2024-04-28 13:35:52 +02:00
parent 55d55bf161
commit cf233abb5a
21 changed files with 443 additions and 27 deletions

View file

@ -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 {