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

@ -20,7 +20,7 @@ use {
ipc::{InitMessage, ServerFeature, ServerMessage, V1InitMessage},
ConfigEntry, VERSION,
},
input::{InputDevice, Seat},
input::{InputDevice, Seat, SwitchEvent},
keyboard::{mods::Modifiers, syms::KeySym},
video::{Connector, DrmDevice},
},
@ -144,6 +144,14 @@ impl ConfigProxy {
pub fn idle(&self) {
self.send(&ServerMessage::Idle);
}
pub fn switch_event(&self, seat: SeatId, input_device: InputDeviceId, event: SwitchEvent) {
self.send(&ServerMessage::SwitchEvent {
seat: Seat(seat.raw() as _),
input_device: InputDevice(input_device.raw() as _),
event,
});
}
}
impl Drop for ConfigProxy {