aboutsummaryrefslogtreecommitdiff
path: root/sway/criteria.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/criteria.c')
-rw-r--r--sway/criteria.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/sway/criteria.c b/sway/criteria.c
index c15f6354..21278a94 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -299,21 +299,17 @@ static bool criteria_test(swayc_t *cont, list_t *tokens) {
case CRIT_ID: // TODO
break;
case CRIT_APP_ID:
- if (!view->iface.get_prop) {
- break;
- }
-
- const char *app_id =
- cont->sway_view->iface.get_prop(view, VIEW_PROP_APP_ID);
+ {
+ const char *app_id = view_get_app_id(cont->sway_view);
+ if (!app_id) {
+ break;
+ }
- if (!app_id) {
+ if (crit->regex && regex_cmp(app_id, crit->regex) == 0) {
+ matches++;
+ }
break;
}
-
- if (crit->regex && regex_cmp(app_id, crit->regex) == 0) {
- matches++;
- }
- break;
case CRIT_INSTANCE: // TODO
break;
case CRIT_TILING: // TODO