tree: allow showing floating windows above fullscreen
This commit is contained in:
parent
f3179b7794
commit
0c02cb5033
17 changed files with 118 additions and 6 deletions
|
|
@ -768,6 +768,16 @@ impl Client {
|
|||
self.send(&ClientMessage::SetColorManagementEnabled { enabled });
|
||||
}
|
||||
|
||||
pub fn set_float_above_fullscreen(&self, above: bool) {
|
||||
self.send(&ClientMessage::SetFloatAboveFullscreen { above });
|
||||
}
|
||||
|
||||
pub fn get_float_above_fullscreen(&self) -> bool {
|
||||
let res = self.send_with_response(&ClientMessage::GetFloatAboveFullscreen);
|
||||
get_response!(res, false, GetFloatAboveFullscreen { above });
|
||||
above
|
||||
}
|
||||
|
||||
pub fn connector_connected(&self, connector: Connector) -> bool {
|
||||
let res = self.send_with_response(&ClientMessage::ConnectorConnected { connector });
|
||||
get_response!(res, false, ConnectorConnected { connected });
|
||||
|
|
|
|||
|
|
@ -542,6 +542,10 @@ pub enum ClientMessage<'a> {
|
|||
connector: Connector,
|
||||
brightness: Option<f64>,
|
||||
},
|
||||
SetFloatAboveFullscreen {
|
||||
above: bool,
|
||||
},
|
||||
GetFloatAboveFullscreen,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
@ -690,6 +694,9 @@ pub enum Response {
|
|||
GetSocketPath {
|
||||
path: String,
|
||||
},
|
||||
GetFloatAboveFullscreen {
|
||||
above: bool,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -273,3 +273,22 @@ pub fn set_ui_drag_threshold(threshold: i32) {
|
|||
pub fn set_color_management_enabled(enabled: bool) {
|
||||
get!().set_color_management_enabled(enabled);
|
||||
}
|
||||
|
||||
/// Sets whether floating windows are shown above fullscreen windows.
|
||||
///
|
||||
/// The default is `false`.
|
||||
pub fn set_float_above_fullscreen(above: bool) {
|
||||
get!().set_float_above_fullscreen(above);
|
||||
}
|
||||
|
||||
/// Gets whether floating windows are shown above fullscreen windows.
|
||||
pub fn get_float_above_fullscreen() -> bool {
|
||||
get!().get_float_above_fullscreen()
|
||||
}
|
||||
|
||||
/// Toggles whether floating windows are shown above fullscreen windows.
|
||||
///
|
||||
/// The default is `false`.
|
||||
pub fn toggle_float_above_fullscreen() {
|
||||
set_float_above_fullscreen(!get_float_above_fullscreen())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue