1
0
Fork 0
forked from wry/wry

autocommit 2022-02-19 19:41:18 CET

This commit is contained in:
Julian Orth 2022-02-19 19:41:18 +01:00
parent bb0468feea
commit ae66acef73
32 changed files with 880 additions and 164 deletions

View file

@ -250,6 +250,10 @@ impl Client {
self.send(&ClientMessage::CreateSplit { seat, axis });
}
pub fn focus_parent(&self, seat: Seat) {
self.send(&ClientMessage::FocusParent { seat });
}
pub fn create_seat(&self, name: &str) -> Seat {
let response = self.with_response(|| self.send(&ClientMessage::CreateSeat { name }));
match response {

View file

@ -119,6 +119,9 @@ pub enum ClientMessage<'a> {
seat: Seat,
axis: Axis,
},
FocusParent {
seat: Seat,
},
}
#[derive(Encode, Decode, Debug)]

View file

@ -134,6 +134,10 @@ impl Seat {
pub fn create_split(self, axis: Axis) {
get!().create_split(self, axis);
}
pub fn focus_parent(self) {
get!().focus_parent(self);
}
}
pub fn get_seats() -> Vec<Seat> {