mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-14 09:02:45 +02:00
fix(wm): update layer on cross monitor moves
This commit is contained in:
@@ -17,6 +17,7 @@ use crate::core::Rect;
|
|||||||
use crate::container::Container;
|
use crate::container::Container;
|
||||||
use crate::ring::Ring;
|
use crate::ring::Ring;
|
||||||
use crate::workspace::Workspace;
|
use crate::workspace::Workspace;
|
||||||
|
use crate::workspace::WorkspaceLayer;
|
||||||
use crate::DefaultLayout;
|
use crate::DefaultLayout;
|
||||||
use crate::Layout;
|
use crate::Layout;
|
||||||
use crate::OperationDirection;
|
use crate::OperationDirection;
|
||||||
@@ -382,6 +383,7 @@ impl Monitor {
|
|||||||
};
|
};
|
||||||
|
|
||||||
target_workspace.floating_windows_mut().push(window);
|
target_workspace.floating_windows_mut().push(window);
|
||||||
|
target_workspace.set_layer(WorkspaceLayer::Floating);
|
||||||
} else {
|
} else {
|
||||||
let container = workspace
|
let container = workspace
|
||||||
.remove_focused_container()
|
.remove_focused_container()
|
||||||
@@ -398,6 +400,8 @@ impl Monitor {
|
|||||||
Some(workspace) => workspace,
|
Some(workspace) => workspace,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
target_workspace.set_layer(WorkspaceLayer::Tiling);
|
||||||
|
|
||||||
if let Some(direction) = direction {
|
if let Some(direction) = direction {
|
||||||
self.add_container_with_direction(
|
self.add_container_with_direction(
|
||||||
container,
|
container,
|
||||||
|
|||||||
@@ -1854,6 +1854,7 @@ impl WindowManager {
|
|||||||
|
|
||||||
if let Some(window) = floating_window {
|
if let Some(window) = floating_window {
|
||||||
target_workspace.floating_windows_mut().push(window);
|
target_workspace.floating_windows_mut().push(window);
|
||||||
|
target_workspace.set_layer(WorkspaceLayer::Floating);
|
||||||
Window::from(window.hwnd)
|
Window::from(window.hwnd)
|
||||||
.move_to_area(¤t_area, target_monitor.work_area_size())?;
|
.move_to_area(¤t_area, target_monitor.work_area_size())?;
|
||||||
} else if let Some(container) = container {
|
} else if let Some(container) = container {
|
||||||
@@ -1863,6 +1864,8 @@ impl WindowManager {
|
|||||||
.map(|w| w.hwnd)
|
.map(|w| w.hwnd)
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
target_workspace.set_layer(WorkspaceLayer::Tiling);
|
||||||
|
|
||||||
if let Some(direction) = move_direction {
|
if let Some(direction) = move_direction {
|
||||||
target_monitor.add_container_with_direction(container, workspace_idx, direction)?;
|
target_monitor.add_container_with_direction(container, workspace_idx, direction)?;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user