autocommit 2022-02-19 19:41:18 CET
This commit is contained in:
parent
bb0468feea
commit
ae66acef73
32 changed files with 880 additions and 164 deletions
|
|
@ -4,5 +4,5 @@ version = "0.1.0"
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
bincode = "2.0.0-beta.2"
|
||||
bincode = "2.0.0-beta.3"
|
||||
log = "0.4.14"
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -119,6 +119,9 @@ pub enum ClientMessage<'a> {
|
|||
seat: Seat,
|
||||
axis: Axis,
|
||||
},
|
||||
FocusParent {
|
||||
seat: Seat,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, Debug)]
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue