1
0
Fork 0
forked from wry/wry

autocommit 2022-03-13 23:16:26 CET

This commit is contained in:
Julian Orth 2022-03-13 23:16:26 +01:00
parent a15a02a95c
commit 18806a38fb
13 changed files with 77 additions and 16 deletions

View file

@ -288,6 +288,10 @@ impl Client {
self.send(&ClientMessage::Quit)
}
pub fn switch_to_vt(&self, vtnr: u32) {
self.send(&ClientMessage::SwitchTo { vtnr })
}
pub fn on_new_input_device<F: Fn(InputDevice) + 'static>(&self, f: F) {
*self.on_new_input_device.borrow_mut() = Some(Rc::new(f));
}

View file

@ -36,6 +36,9 @@ pub enum ClientMessage<'a> {
name: &'a str,
},
Quit,
SwitchTo {
vtnr: u32,
},
SetSeat {
device: InputDevice,
seat: Seat,

View file

@ -165,6 +165,10 @@ pub fn quit() {
get!().quit()
}
pub fn switch_to_vt(n: u32) {
get!().switch_to_vt(n)
}
pub struct Command {
prog: String,
args: Vec<String>,