config: allow handling switch events
This commit is contained in:
parent
55d55bf161
commit
cf233abb5a
21 changed files with 443 additions and 27 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue