diff --git a/komorebi-bar/src/komorebi.rs b/komorebi-bar/src/komorebi.rs index 1d6040f01..a689352b4 100644 --- a/komorebi-bar/src/komorebi.rs +++ b/komorebi-bar/src/komorebi.rs @@ -164,7 +164,10 @@ impl BarWidget for Komorebi { proceed = false; } - if proceed && komorebi_client::send_message(&SocketMessage::Retile).is_err() { + if proceed + && komorebi_client::send_message(&SocketMessage::RetileWithResizeDimensions) + .is_err() + { tracing::error!("could not send message to komorebi: Retile"); } } diff --git a/komorebi/src/core/mod.rs b/komorebi/src/core/mod.rs index ee9929016..33bfa0d9f 100644 --- a/komorebi/src/core/mod.rs +++ b/komorebi/src/core/mod.rs @@ -103,6 +103,7 @@ pub enum SocketMessage { Stop, TogglePause, Retile, + RetileWithResizeDimensions, QuickSave, QuickLoad, Save(PathBuf), diff --git a/komorebi/src/process_command.rs b/komorebi/src/process_command.rs index 0e79ee8cc..0cfa013e9 100644 --- a/komorebi/src/process_command.rs +++ b/komorebi/src/process_command.rs @@ -632,6 +632,11 @@ impl WindowManager { border_manager::destroy_all_borders()?; self.retile_all(false)? } + SocketMessage::RetileWithResizeDimensions => { + border_manager::BORDER_TEMPORARILY_DISABLED.store(false, Ordering::SeqCst); + border_manager::destroy_all_borders()?; + self.retile_all(true)? + } SocketMessage::FlipLayout(layout_flip) => self.flip_layout(layout_flip)?, SocketMessage::ChangeLayout(layout) => self.change_workspace_layout_default(layout)?, SocketMessage::CycleLayout(direction) => self.cycle_layout(direction)?,