Skip to content

Commit 8d78ab6

Browse files
rpigottemersion
authored andcommitted
criteria: be lenient on window_role and instance too
1 parent 817f1bb commit 8d78ab6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sway/criteria.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static bool criteria_matches_view(struct criteria *criteria,
287287

288288
switch (criteria->instance->match_type) {
289289
case PATTERN_FOCUSED:
290-
if (focused && strcmp(instance, view_get_instance(focused))) {
290+
if (focused && lenient_strcmp(instance, view_get_instance(focused))) {
291291
return false;
292292
}
293293
break;
@@ -307,7 +307,7 @@ static bool criteria_matches_view(struct criteria *criteria,
307307

308308
switch (criteria->window_role->match_type) {
309309
case PATTERN_FOCUSED:
310-
if (focused && strcmp(window_role, view_get_window_role(focused))) {
310+
if (focused && lenient_strcmp(window_role, view_get_window_role(focused))) {
311311
return false;
312312
}
313313
break;

0 commit comments

Comments
 (0)