Skip to content

Commit

Permalink
fix: prevent moving tiling windows with mouse from affecting hidden w…
Browse files Browse the repository at this point in the history
…orkspaces (#877)
  • Loading branch information
lars-berger authored Dec 2, 2024
1 parent ee9f756 commit ac4ae08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fn drop_as_tiling_window(
// Get the workspace, split containers, and other windows under the
// dragged window.
let containers_at_pos = state
.containers_at_point(&mouse_pos)
.containers_at_point(workspace.clone().into(), &mouse_pos)
.into_iter()
.filter(|container| container.id() != moved_window.id());

Expand Down
9 changes: 6 additions & 3 deletions packages/wm/src/wm_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,12 @@ impl WmState {
.or(Some(workspace.into()))
}

pub fn containers_at_point(&self, point: &Point) -> Vec<Container> {
self
.root_container
pub fn containers_at_point(
&self,
origin_container: Container,
point: &Point,
) -> Vec<Container> {
origin_container
.descendants()
.filter(|descendant| {
descendant
Expand Down

0 comments on commit ac4ae08

Please sign in to comment.