From 9b6bb93a77582d9317bfe39eec801ada5f0457ae Mon Sep 17 00:00:00 2001 From: Philip Sterne Date: Thu, 13 Aug 2026 12:17:23 +0200 Subject: [PATCH] fix: ignore no-op stack resize grabs --- src/extension.ts | 8 ++++++-- src/movement.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 503407f3..71d76f01 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1157,6 +1157,12 @@ export class Ext extends Ecs.System { const forest = this.auto_tiler.forest; const fork = forest.forks.get(fork_entity); if (fork) { + const movement = grab_op.operation(crect); + + // A click on a resize edge can begin and end a grab without + // changing the window. Do not turn that into a tree resize. + if (movement === Movement.NONE) return; + if (win.stack) { const tab_dimension = this.dpi * stack.TAB_HEIGHT; crect.height += tab_dimension; @@ -1168,8 +1174,6 @@ export class Ext extends Ecs.System { crect.clamp((forest.forks.get(top_level) as Fork).area); } - const movement = grab_op.operation(crect); - if (this.movement_is_valid(win, movement)) { forest.resize(this, fork_entity, fork, win.entity, movement, crect); forest.arrange(this, fork.workspace); diff --git a/src/movement.ts b/src/movement.ts index 4ee74363..fdfcdf30 100644 --- a/src/movement.ts +++ b/src/movement.ts @@ -15,7 +15,7 @@ export function calculate(from: Rectangular, change: Rectangular): Movement { if (xpos && ypos) { if (from.width == change.width) { - if (from.height == change.width) { + if (from.height == change.height) { return Movement.NONE; } else if (from.height < change.height) { return Movement.GROW | Movement.DOWN;