oxwm

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

Merge branch 'master' into floating

Commit
246177aa3b75aa4efb91c0122cc7536e8a3b504d
Parents
7efd8c0 fe6d8c8
Author
Emzy <71552895+emzywastaken@users.noreply.github.com>
Date
2025-10-14 20:54:57

Diff

diff --cc src/window_manager.rs
index 8c5a0de,27ca7e2..beb16a1
--- a/src/window_manager.rs
+++ b/src/window_manager.rs
@@@ -315,25 -316,7 +316,25 @@@ impl WindowManager 
          }
      }
  
-     fn toggle_floating(&mut self) -> Result<()> {
++    fn toggle_floating(&mut self) -> WmResult<()> {
 +        if let Some(focused) = self.focused_window {
 +            if self.floating_windows.contains(&focused) {
 +                self.floating_windows.remove(&focused);
 +                self.apply_layout()?;
 +            } else {
 +                self.floating_windows.insert(focused);
 +                self.connection.configure_window(
 +                    focused,
 +                    &ConfigureWindowAux::new().stack_mode(StackMode::ABOVE),
 +                )?;
 +                self.apply_layout()?;
 +                self.connection.flush()?;
 +            }
 +        }
 +        Ok(())
 +    }
 +
-     fn toggle_fullscreen(&mut self) -> Result<()> {
+     fn toggle_fullscreen(&mut self) -> WmResult<()> {
          if let Some(focused) = self.focused_window {
              if self.fullscreen_window == Some(focused) {
                  self.fullscreen_window = None;