diff options
author | Ryan Dwyer <[email protected]> | 2018-05-14 22:47:10 +1000 |
---|---|---|
committer | Ryan Dwyer <[email protected]> | 2018-05-15 11:18:27 +1000 |
commit | 22d38600d0edbb35029b3076c14e0e119dbf3dd2 (patch) | |
tree | ad548731ca215e2ec0f56cde86a6ff16df8cb323 /sway/criteria.c | |
parent | f1f54bbc882775d431d14f99355d339ef9dab5a8 (diff) |
Implement marks
Diffstat (limited to 'sway/criteria.c')
-rw-r--r-- | sway/criteria.c | 12 |
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 |