desktop: support switching to windows in other workspaces

This commit is contained in:
Droc 2024-01-29 07:21:01 -06:00
parent f908e332b3
commit 5ba89ca6f8
4 changed files with 70 additions and 45 deletions

View file

@ -299,6 +299,22 @@ bool view_matches_query(struct view *view, struct view_query *query);
view; \
view = view_next(head, view, criteria))
/**
* for_each_view_iter() - iterate in given direction against criteria
* @view: Iterator.
* @head: Head of list to iterate over.
* @iter: Iterator function to get next or previous view
* @criteria: Criteria to match against.
* Example:
* stuct view *(*iter)(struct wl_list *head, struct view *view,
enum lab_view_criteria criteria);
* iter = forwards ? view_next : view_prev;
*/
#define for_each_view_iter(view, head, iter, criteria) \
for (view = iter(head, NULL, criteria); \
view; \
view = iter(head, view, criteria))
/**
* view_next() - Get next view which matches criteria.
* @head: Head of list to iterate over.
@ -311,6 +327,9 @@ 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);
struct view *view_prev(struct wl_list *head, struct view *view,
enum lab_view_criteria criteria);
/**
* view_array_append() - Append views that match criteria to array
* @server: server context