mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-21 00:49:25 +01:00
fix(wm): take layer into account on ws restore
Previously if a workspace had any floating windows it would always focus the first one when restoring. Now it only focus the floating window if the workspace layer is `Floating`.
This commit is contained in:
@@ -303,7 +303,7 @@ impl Workspace {
|
||||
// Maximised windows and floating windows should always be drawn at the top of the Z order
|
||||
// when switching to a workspace
|
||||
if let Some(window) = to_focus {
|
||||
if self.maximized_window().is_none() && self.floating_windows().is_empty() {
|
||||
if self.maximized_window().is_none() && matches!(self.layer, WorkspaceLayer::Tiling) {
|
||||
window.focus(mouse_follows_focus)?;
|
||||
} else if let Some(maximized_window) = self.maximized_window() {
|
||||
maximized_window.focus(mouse_follows_focus)?;
|
||||
|
||||
Reference in New Issue
Block a user