Skip to content

Commit

Permalink
tiling: Only render swap-preview on active output
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Sep 13, 2023
1 parent a5b10f5 commit 82c7d65
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/shell/layout/tiling/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4711,6 +4711,9 @@ where
})
})
.map(|(id, _)| id);
let is_active_output = seat
.map(|seat| &seat.active_output() == output)
.unwrap_or(false);

let mut animating_window_elements = Vec::new();
let mut window_elements = Vec::new();
Expand All @@ -4725,7 +4728,8 @@ where
let output_scale = output.current_scale().fractional_scale();

let (swap_indicator, swap_tree) = overview.1.unzip();
let swap_tree = swap_tree.flatten();
let swap_tree = swap_tree.flatten().filter(|_| is_active_output);
let swap_desc = swap_desc.filter(|_| is_active_output);

if target_tree.root_node_id().is_none() && swap_desc.is_some() {
let mut geo = non_exclusive_zone;
Expand Down

0 comments on commit 82c7d65

Please sign in to comment.