output: Add output_update_usable_area/all_usable_areas()

Move the desktop_arrange_all_views() call outside layers_arrange() into
a new function, output_update_usable_area().  The new function currently
does exactly what layers_arrange() used to, but will be expanded in a
later commit.

Add output_update_all_usable_areas(), which is the same as calling
output_update_usable_area() for each output, but only calls
desktop_arrange_all_views() once.

Rebased and slightly modified by @Consolatis
This commit is contained in:
John Lindgren 2022-11-16 12:43:59 -05:00 committed by Consolatis
parent af56b68041
commit ed31381eb8
4 changed files with 54 additions and 22 deletions

View file

@ -423,6 +423,8 @@ void output_init(struct server *server);
void output_manager_init(struct server *server);
struct output *output_from_wlr_output(struct server *server,
struct wlr_output *wlr_output);
void output_update_usable_area(struct output *output);
void output_update_all_usable_areas(struct server *server, bool enforce_view_arrange);
struct wlr_box output_usable_area_in_layout_coords(struct output *output);
struct wlr_box output_usable_area_from_cursor_coords(struct server *server);
void handle_output_power_manager_set_mode(struct wl_listener *listener,