]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view.c: add new NO_OMNIPRESENT criteria
authorDreamMaoMao <2523610504@qq.com>
Thu, 5 Jun 2025 11:33:12 +0000 (19:33 +0800)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Fri, 6 Jun 2025 16:35:32 +0000 (18:35 +0200)
include/view.h
src/view.c

index e26cff322694160854506f92957033fb949e86ab..5b93e98e50fe94242bfa1648f134d48d81e87cfb 100644 (file)
@@ -340,6 +340,7 @@ enum lab_view_criteria {
        /* Negative criteria */
        LAB_VIEW_CRITERIA_NO_ALWAYS_ON_TOP        = 1 << 6,
        LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER = 1 << 7,
+       LAB_VIEW_CRITERIA_NO_OMNIPRESENT          = 1 << 8,
 };
 
 /**
index a9797fef3807c503ffcae21111ab82faffb2b45b..15278a2979a4815870d59f541bf8f65c1dbc610f 100644 (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;
 }