summaryrefslogtreecommitdiff
path: root/src/clients/client.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-07-04 22:22:46 +0100
committertcmal <me@aria.rip>2024-07-04 22:22:46 +0100
commitb9778944ba27e1deeec1be2bdc286790e6274470 (patch)
tree479e6312692551d1699738ea7da8e3fc44189055 /src/clients/client.rs
parentd147f26efa31cccf162b939c067ab3b6ed2842e2 (diff)
support floating windows
Diffstat (limited to 'src/clients/client.rs')
-rw-r--r--src/clients/client.rs13
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 {