]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/snap-constraints.c: ignore view origin during constraint updates
authorAndrew J. Hesford <ajh@sideband.org>
Sat, 5 Jul 2025 01:24:07 +0000 (21:24 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 6 Jul 2025 17:45:21 +0000 (18:45 +0100)
src/resistance.c
src/snap-constraints.c

index d8eb29813723ac9ccb4703988783397002d84e06..bc1bf8ad4ca52bfb2f385eeeb8846185ab1d990f 100644 (file)
@@ -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
index 24fe803c91bb6ff188595a1b1cbc9d2e510105c6..bc1ffd14890de02c3b2fd9db7fc477f9a0ed3e1f 100644 (file)
@@ -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;
        }