autocommit 2022-03-13 23:16:26 CET
This commit is contained in:
parent
a15a02a95c
commit
18806a38fb
13 changed files with 77 additions and 16 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ pub enum ClientMessage<'a> {
|
|||
name: &'a str,
|
||||
},
|
||||
Quit,
|
||||
SwitchTo {
|
||||
vtnr: u32,
|
||||
},
|
||||
SetSeat {
|
||||
device: InputDevice,
|
||||
seat: Seat,
|
||||
|
|
|
|||
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue