desktop: refactor desktop_cycle_view()

...in preparation for using common window-rule criteria with osd.c

No functional change intended.

Related-to #1454
This commit is contained in:
Johan Malm 2024-01-25 19:52:54 +00:00 committed by Consolatis
parent 6a35e8e78c
commit 777e6bb868
3 changed files with 77 additions and 90 deletions

View file

@ -321,6 +321,15 @@ bool view_matches_query(struct view *view, struct view_query *query);
struct view *view_next(struct wl_list *head, struct view *view,
enum lab_view_criteria criteria);
/*
* Same as `view_next()` except that they iterate one whole cycle rather than
* stopping at the list-head
*/
struct view *view_next_no_head_stop(struct wl_list *head, struct view *from,
enum lab_view_criteria criteria);
struct view *view_prev_no_head_stop(struct wl_list *head, struct view *from,
enum lab_view_criteria criteria);
/**
* view_array_append() - Append views that match criteria to array
* @server: server context