mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-01 23:13:22 +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::ring::Ring;
|
||||
use crate::workspace::Workspace;
|
||||
use crate::workspace::WorkspaceLayer;
|
||||
use crate::DefaultLayout;
|
||||
use crate::Layout;
|
||||
use crate::OperationDirection;
|
||||
@@ -382,6 +383,7 @@ impl Monitor {
|
||||
};
|
||||
|
||||
target_workspace.floating_windows_mut().push(window);
|
||||
target_workspace.set_layer(WorkspaceLayer::Floating);
|
||||
} else {
|
||||
let container = workspace
|
||||
.remove_focused_container()
|
||||
@@ -398,6 +400,8 @@ impl Monitor {
|
||||
Some(workspace) => workspace,
|
||||
};
|
||||
|
||||
target_workspace.set_layer(WorkspaceLayer::Tiling);
|
||||
|
||||
if let Some(direction) = direction {
|
||||
self.add_container_with_direction(
|
||||
container,
|
||||
|
||||
@@ -1854,6 +1854,7 @@ impl WindowManager {
|
||||
|
||||
if let Some(window) = floating_window {
|
||||
target_workspace.floating_windows_mut().push(window);
|
||||
target_workspace.set_layer(WorkspaceLayer::Floating);
|
||||
Window::from(window.hwnd)
|
||||
.move_to_area(¤t_area, target_monitor.work_area_size())?;
|
||||
} else if let Some(container) = container {
|
||||
@@ -1863,6 +1864,8 @@ impl WindowManager {
|
||||
.map(|w| w.hwnd)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
target_workspace.set_layer(WorkspaceLayer::Tiling);
|
||||
|
||||
if let Some(direction) = move_direction {
|
||||
target_monitor.add_container_with_direction(container, workspace_idx, direction)?;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user