From 22d38600d0edbb35029b3076c14e0e119dbf3dd2 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 14 May 2018 22:47:10 +1000 Subject: Implement marks --- sway/criteria.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sway/criteria.c') 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 -- cgit v1.2.3