view.c: add new NO_OMNIPRESENT criteria

This commit is contained in:
DreamMaoMao 2025-06-05 19:33:12 +08:00 committed by Consolatis
parent c5b9e2665d
commit 5cf4aa83e2
2 changed files with 10 additions and 0 deletions

View file

@ -263,6 +263,15 @@ matches_criteria(struct view *view, enum lab_view_criteria criteria)
return false;
}
}
if (criteria & LAB_VIEW_CRITERIA_NO_OMNIPRESENT) {
/*
* TODO: Once always-on-top views use a per-workspace
* sub-tree we can remove the check from this condition.
*/
if (view->visible_on_all_workspaces || view_is_always_on_top(view)) {
return false;
}
}
return true;
}