diff options
author | Drew DeVault <[email protected]> | 2018-05-14 21:44:05 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2018-05-14 21:44:05 -0400 |
commit | 95f6d0deba26436445b45d4d056c1f6dd2ee82da (patch) | |
tree | df558830f4c0f5bc9e8943cfbf60532f2293aeda /sway/criteria.c | |
parent | f1f54bbc882775d431d14f99355d339ef9dab5a8 (diff) | |
parent | 4d1edfcba90854bd7f37ecb1b36fe4f05c37dda3 (diff) |
Merge pull request #1954 from RyanDwyer/marks
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 |