oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git

feat: Fullscreen mode implemntation

Commit
6b9ab97cb306cfb9e780c8ea0a0014ff9ea6b878
Parent
2342897
Author
xsoder <tadihailukebe@gmail.com>
Date
2025-10-09 04:58:55

Diff

diff --git a/src/window_manager.rs b/src/window_manager.rs
index 0e8633a..937f624 100644
--- a/src/window_manager.rs
+++ b/src/window_manager.rs
@@ -283,23 +283,17 @@ impl WindowManager {
     fn toggle_fullscreen(&mut self) -> Result<()> {
         if let Some(focused) = self.focused_window {
             if self.fullscreen_window == Some(focused) {
-                // Exit fullscreen
                 self.fullscreen_window = None;
                 
-                // Show bar
                 self.connection.map_window(self.bar.window())?;
                 
-                // Restore normal layout
                 self.apply_layout()?;
                 self.update_focus_visuals()?;
             } else {
-                // Enter fullscreen
                 self.fullscreen_window = Some(focused);
                 
-                // Hide bar
                 self.connection.unmap_window(self.bar.window())?;
                 
-                // Make window fill entire screen
                 let screen_width = self.screen.width_in_pixels as u32;
                 let screen_height = self.screen.height_in_pixels as u32;
                 
@@ -311,7 +305,7 @@ impl WindowManager {
                         .width(screen_width)
                         .height(screen_height)
                         .border_width(0)
-                        .stack_mode(StackMode::ABOVE),  // This raises the window
+                        .stack_mode(StackMode::ABOVE),
                 )?;
                 
                 self.connection.flush()?;