view: eliminate store_natural_geometry arguments

These were added to fix handling of natural geometry for snap-to-edge
behavior back in 9021020f6e and seemed like a good idea at the time.
Since then, the number of call sites has exploded, so it seems more
maintainable to put explicit checks for interactive move within the
three functions affected.
This commit is contained in:
John Lindgren 2025-12-31 23:18:25 -05:00 committed by Johan Malm
parent 742c2b53fd
commit f5909ac54d
7 changed files with 36 additions and 46 deletions

View file

@ -273,17 +273,12 @@ snap_to_edge(struct view *view)
enum lab_edge edge = edge1 | edge2;
view_set_output(view, output);
/*
* Don't store natural geometry here (it was
* stored already in interactive_begin())
*/
if (edge == LAB_EDGE_TOP && rc.snap_top_maximize) {
/* <topMaximize> */
view_maximize(view, VIEW_AXIS_BOTH,
/*store_natural_geometry*/ false);
view_maximize(view, VIEW_AXIS_BOTH);
} else {
view_snap_to_edge(view, edge, /*across_outputs*/ false,
/*combine*/ false, /*store_natural_geometry*/ false);
/*combine*/ false);
}
return true;
@ -298,8 +293,7 @@ snap_to_region(struct view *view)
struct region *region = regions_from_cursor(view->server);
if (region) {
view_snap_to_region(view, region,
/*store_natural_geometry*/ false);
view_snap_to_region(view, region);
return true;
}
return false;