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

@ -337,6 +337,13 @@ impl ConfigProxyHandler {
self.state.el.stop();
}
fn handle_switch_to(&self, vtnr: u32) {
match self.state.backend.get() {
Some(b) => b.switch_to(vtnr),
_ => log::warn!("Cannot switch to VT {}: Backend has not yet started", vtnr),
}
}
fn handle_toggle_floating(&self, seat: Seat) -> Result<(), FocusParentError> {
let seat = self.get_seat(seat)?;
seat.toggle_floating();
@ -472,6 +479,7 @@ impl ConfigProxyHandler {
ClientMessage::FocusParent { seat } => self.handle_focus_parent(seat)?,
ClientMessage::ToggleFloating { seat } => self.handle_toggle_floating(seat)?,
ClientMessage::Quit => self.handle_quit(),
ClientMessage::SwitchTo { vtnr } => self.handle_switch_to(vtnr),
}
Ok(())
}