aboutsummaryrefslogtreecommitdiffstats
path: root/sway/criteria.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-14 22:47:10 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-15 11:18:27 +1000
commit22d38600d0edbb35029b3076c14e0e119dbf3dd2 (patch)
treead548731ca215e2ec0f56cde86a6ff16df8cb323 /sway/criteria.c
parentMerge pull request #1978 from RedSoxFan/fix-1975 (diff)
downloadsway-22d38600d0edbb35029b3076c14e0e119dbf3dd2.tar.gz
sway-22d38600d0edbb35029b3076c14e0e119dbf3dd2.tar.zst
sway-22d38600d0edbb35029b3076c14e0e119dbf3dd2.zip
Implement marks
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,
75 } 75 }
76 76
77 if (criteria->con_mark) { 77 if (criteria->con_mark) {
78 // TODO 78 bool exists = false;
79 return false; 79 for (int i = 0; i < view->marks->length; ++i) {
80 if (regex_cmp(view->marks->items[i], criteria->con_mark) == 0) {
81 exists = true;
82 break;
83 }
84 }
85 if (!exists) {
86 return false;
87 }
80 } 88 }
81 89
82 if (criteria->con_id) { // Internal ID 90 if (criteria->con_id) { // Internal ID