From 7da431081e4a5585e942f4861121e051f925b984 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Tue, 21 Jun 2022 16:41:07 -0700 Subject: [PATCH] fix(wm): identify overflow apps on drag move This commit ensures that border overflow applications are correctly identified as being moved instead of being resized when dragged to a new position using the mouse. fix #159 --- komorebi/src/process_event.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/komorebi/src/process_event.rs b/komorebi/src/process_event.rs index 6bdb2306..7f6d5f8f 100644 --- a/komorebi/src/process_event.rs +++ b/komorebi/src/process_event.rs @@ -288,6 +288,7 @@ impl WindowManager { .ok_or_else(|| anyhow!("cannot get monitor idx from current position"))?; let new_window_behaviour = self.window_container_behaviour; + let invisible_borders = self.invisible_borders; let workspace = self.focused_workspace_mut()?; if workspace @@ -340,7 +341,10 @@ impl WindowManager { // If we have moved across the monitors, use that override, otherwise determine // if a move has taken place by ruling out a resize - let is_move = moved_across_monitors || resize.right == 0 && resize.bottom == 0; + let is_move = moved_across_monitors + || resize.right == 0 && resize.bottom == 0 + || resize.right.abs() == invisible_borders.right + && resize.bottom.abs() == invisible_borders.bottom; if is_move { tracing::info!("moving with mouse");