view: expose view_set_maximized() instead of view_restore_to()

view_restore_to() (which is just set_maximized() + view_move_resize())
hasn't aged well and doesn't line up with typical usage anymore:

 - it's missing view_set_untiled(), which has to be called separately
 - it always forces view_move_resize() even when that's not needed
 - it doesn't allow un-maximizing only one axis (see next commit)
 - the fullscreen check is unnecessary (already checked in callers)

Eliminate it and just expose view_set_maximized() instead.

No functional change intended in this commit.
This commit is contained in:
John Lindgren 2025-09-01 11:49:24 -04:00 committed by Johan Malm
parent 72a5df16ea
commit 6d2140c4b7
4 changed files with 20 additions and 27 deletions

View file

@ -518,7 +518,7 @@ void view_place_by_policy(struct view *view, bool allow_cursor,
enum lab_placement_policy policy);
void view_constrain_size_to_that_of_usable_area(struct view *view);
void view_restore_to(struct view *view, struct wlr_box geometry);
void view_set_maximized(struct view *view, enum view_axis maximized);
void view_set_untiled(struct view *view);
void view_maximize(struct view *view, enum view_axis axis,
bool store_natural_geometry);