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

@ -291,8 +291,9 @@ process_cursor_move(struct server *server, uint32_t time)
interactive_anchor_to_cursor(server, &new_geo);
/* Shaded clients will not process resize events until unshaded */
view_set_shade(view, false);
view_set_maximized(view, VIEW_AXIS_NONE);
view_set_untiled(view);
view_restore_to(view, new_geo);
view_move_resize(view, new_geo);
x = new_geo.x;
y = new_geo.y;
}