summaryrefslogtreecommitdiff
path: root/src/helpers.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-07-15 15:30:06 +0100
committertcmal <me@aria.rip>2024-07-15 19:18:59 +0100
commit5d2a23a5d618725b75ba77d7185601e5439801c5 (patch)
treec0d37b1e3e3bd796deab0de904b31ef5cd21e048 /src/helpers.rs
parent641d4db398357bd50e83dc77464558acf83d9b1d (diff)
support fullscreen mode
Diffstat (limited to 'src/helpers.rs')
-rw-r--r--src/helpers.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/helpers.rs b/src/helpers.rs
index b7488dd..24c8cf2 100644
--- a/src/helpers.rs
+++ b/src/helpers.rs
@@ -47,3 +47,10 @@ pub fn toggle_floating(wm: &mut WM<'_>) {
wm.clients.toggle_floating(&wm.conn, pos);
}
}
+
+/// Toggle fullscreen status for the currently focused window
+pub fn toggle_fullscreen(wm: &mut WM<'_>) {
+ if let Some(pos) = wm.clients.focused_pos() {
+ wm.clients.toggle_fullscreen(&wm.conn, pos);
+ }
+}