From bb1d836b6dcf3a8e0e5bd54b12687921844c7ed8 Mon Sep 17 00:00:00 2001 From: Dusan Date: Thu, 30 Jan 2025 16:48:39 +0100 Subject: [PATCH] shell: next_output - axis overlap filter logic without negation Signed-off-by: Dusan --- src/shell/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shell/mod.rs b/src/shell/mod.rs index 55f0c3e0..34da7aeb 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -1780,12 +1780,12 @@ impl Shell { let geo = o.geometry(); match direction { Direction::Left | Direction::Right => { - !(geo.loc.y + geo.size.h < current_output_geo.loc.y - || geo.loc.y > current_output_geo.loc.y + current_output_geo.size.h) + geo.loc.y < current_output_geo.loc.y + current_output_geo.size.h + && geo.loc.y + geo.size.h > current_output_geo.loc.y } Direction::Up | Direction::Down => { - !(geo.loc.x + geo.size.w < current_output_geo.loc.x - || geo.loc.x > current_output_geo.loc.x + current_output_geo.size.w) + geo.loc.x < current_output_geo.loc.x + current_output_geo.size.w + && geo.loc.x + geo.size.w > current_output_geo.loc.x } } })