From d2175b3a8b1a6c6e445cda7968a5eb5bcf649f20 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Fri, 4 Jul 2025 21:24:07 -0400 Subject: [PATCH] src/snap-constraints.c: ignore view origin during constraint updates --- src/resistance.c | 2 +- src/snap-constraints.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/resistance.c b/src/resistance.c index d8eb2981..bc1bf8ad 100644 --- a/src/resistance.c +++ b/src/resistance.c @@ -185,7 +185,7 @@ resistance_resize_apply(struct view *view, struct wlr_box *new_geom) /* If any "best" edges were encountered during this move, snap motion */ edges_adjust_resize_geom(view, next_edges, - view->server->resize_edges, new_geom, /* use_pending */ false); + resize_edges, new_geom, /* use_pending */ false); /* * Record effective geometry after snapping in case the client opts to diff --git a/src/snap-constraints.c b/src/snap-constraints.c index 24fe803c..bc1ffd14 100644 --- a/src/snap-constraints.c +++ b/src/snap-constraints.c @@ -152,8 +152,12 @@ snap_constraints_update(struct view *view) return; } - /* Only update constraints when view geometry matches expectation */ - if (!wlr_box_equal(&view->pending, &last_snap_hit.geom)) { + /* Only update constraints when pending view dimensions match expectation */ + if (view->pending.width != last_snap_hit.geom.width) { + return; + } + + if (view->pending.height != last_snap_hit.geom.height) { return; } -- 2.52.0