1
0
Fork 0
forked from wry/wry

tree: allow floats to be pinned

This commit is contained in:
Julian Orth 2025-04-24 14:21:25 +02:00
parent 3e6640f0ca
commit 65a66c2e26
28 changed files with 528 additions and 36 deletions

View file

@ -778,6 +778,20 @@ impl Client {
above
}
pub fn set_show_float_pin_icon(&self, show: bool) {
self.send(&ClientMessage::SetShowFloatPinIcon { show });
}
pub fn get_pinned(&self, seat: Seat) -> bool {
let res = self.send_with_response(&ClientMessage::GetFloatPinned { seat });
get_response!(res, false, GetFloatPinned { pinned });
pinned
}
pub fn set_pinned(&self, seat: Seat, pinned: bool) {
self.send(&ClientMessage::SetFloatPinned { seat, pinned });
}
pub fn connector_connected(&self, connector: Connector) -> bool {
let res = self.send_with_response(&ClientMessage::ConnectorConnected { connector });
get_response!(res, false, ConnectorConnected { connected });

View file

@ -546,6 +546,16 @@ pub enum ClientMessage<'a> {
above: bool,
},
GetFloatAboveFullscreen,
GetFloatPinned {
seat: Seat,
},
SetFloatPinned {
seat: Seat,
pinned: bool,
},
SetShowFloatPinIcon {
show: bool,
},
}
#[derive(Serialize, Deserialize, Debug)]
@ -697,6 +707,9 @@ pub enum Response {
GetFloatAboveFullscreen {
above: bool,
},
GetFloatPinned {
pinned: bool,
},
}
#[derive(Serialize, Deserialize, Debug)]