aboutsummaryrefslogtreecommitdiff
path: root/sway/criteria.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/criteria.c')
-rw-r--r--sway/criteria.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sway/criteria.c b/sway/criteria.c
index 248260ec..4295cacc 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -75,8 +75,16 @@ static bool criteria_matches_view(struct criteria *criteria,
}
if (criteria->con_mark) {
- // TODO
- return false;
+ bool exists = false;
+ for (int i = 0; i < view->marks->length; ++i) {
+ if (regex_cmp(view->marks->items[i], criteria->con_mark) == 0) {
+ exists = true;
+ break;
+ }
+ }
+ if (!exists) {
+ return false;
+ }
}
if (criteria->con_id) { // Internal ID