diff options
Diffstat (limited to 'src/clients/client.rs')
-rw-r--r-- | src/clients/client.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/clients/client.rs b/src/clients/client.rs index 394c319..17cfd4f 100644 --- a/src/clients/client.rs +++ b/src/clients/client.rs @@ -12,6 +12,7 @@ use super::hints; /// Information about a single client / window #[derive(Debug)] +#[allow(clippy::struct_excessive_bools)] pub struct Client { /// The corresponding X11 window window: Window, @@ -25,6 +26,7 @@ pub struct Client { urgent: bool, never_focus: bool, + floating: bool, } impl Client { @@ -39,6 +41,7 @@ impl Client { mapped: false, urgent: false, never_focus: false, + floating: false, } } @@ -104,6 +107,16 @@ impl Client { }); } + /// Whether the client is floating - outside of current tiling rules and displaying over any tiled windows + pub const fn floating(&self) -> bool { + self.floating + } + + /// Set the floating status. + pub fn set_floating(&mut self, floating: bool) { + self.floating = floating; + } + /// Ensure this client is currently mapped / visible pub fn ensure_mapped(&mut self, conn: &Connection<'_>) { if !self.mapped { |