diff options
author | 2022-12-08 11:30:20 -0700 | |
---|---|---|
committer | 2022-12-08 21:20:45 +0100 | |
commit | 991d75904f1460a6cc3a0b11c145bff876035897 (patch) | |
tree | bcb3cf91ee48e9c074f2cb9774bfe734168e2c3a /sway | |
parent | ci: install Xwayland .pc file (diff) | |
download | sway-991d75904f1460a6cc3a0b11c145bff876035897.tar.gz sway-991d75904f1460a6cc3a0b11c145bff876035897.tar.zst sway-991d75904f1460a6cc3a0b11c145bff876035897.zip |
criteria: be lenient on window_role and instance too
Diffstat (limited to 'sway')
-rw-r--r-- | sway/criteria.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/criteria.c b/sway/criteria.c index 0f161834..d7326bea 100644 --- a/sway/criteria.c +++ b/sway/criteria.c | |||
@@ -287,7 +287,7 @@ static bool criteria_matches_view(struct criteria *criteria, | |||
287 | 287 | ||
288 | switch (criteria->instance->match_type) { | 288 | switch (criteria->instance->match_type) { |
289 | case PATTERN_FOCUSED: | 289 | case PATTERN_FOCUSED: |
290 | if (focused && strcmp(instance, view_get_instance(focused))) { | 290 | if (focused && lenient_strcmp(instance, view_get_instance(focused))) { |
291 | return false; | 291 | return false; |
292 | } | 292 | } |
293 | break; | 293 | break; |
@@ -307,7 +307,7 @@ static bool criteria_matches_view(struct criteria *criteria, | |||
307 | 307 | ||
308 | switch (criteria->window_role->match_type) { | 308 | switch (criteria->window_role->match_type) { |
309 | case PATTERN_FOCUSED: | 309 | 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))) { |
311 | return false; | 311 | return false; |
312 | } | 312 | } |
313 | break; | 313 | break; |