aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorCallum Andrew <calcium@mailbox.org>2022-11-04 12:31:00 +1100
committerSimon Ser <contact@emersion.fr>2022-11-04 10:02:11 +0100
commit3e19836f0e4d5c1cd68ea205a377b8cd491e6757 (patch)
treeba8e31c42ca55f64c4979f6b1fca8c2bf0605993 /sway
parente40eb338b9d104e3d9fce46914b155f3ddb1e702 (diff)
criteria: allow matching for NULL string criteria
Diffstat (limited to 'sway')
-rw-r--r--sway/criteria.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/criteria.c b/sway/criteria.c
index e62f9c1f..0f161834 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -210,7 +210,7 @@ static bool criteria_matches_view(struct criteria *criteria,
if (criteria->shell) {
const char *shell = view_get_shell(view);
if (!shell) {
- return false;
+ shell = "";
}
switch (criteria->shell->match_type) {
@@ -230,7 +230,7 @@ static bool criteria_matches_view(struct criteria *criteria,
if (criteria->app_id) {
const char *app_id = view_get_app_id(view);
if (!app_id) {
- return false;
+ app_id = "";
}
switch (criteria->app_id->match_type) {
@@ -262,7 +262,7 @@ static bool criteria_matches_view(struct criteria *criteria,
if (criteria->class) {
const char *class = view_get_class(view);
if (!class) {
- return false;
+ class = "";
}
switch (criteria->class->match_type) {
@@ -282,7 +282,7 @@ static bool criteria_matches_view(struct criteria *criteria,
if (criteria->instance) {
const char *instance = view_get_instance(view);
if (!instance) {
- return false;
+ instance = "";
}
switch (criteria->instance->match_type) {
@@ -302,7 +302,7 @@ static bool criteria_matches_view(struct criteria *criteria,
if (criteria->window_role) {
const char *window_role = view_get_window_role(view);
if (!window_role) {
- return false;
+ window_role = "";
}
switch (criteria->window_role->match_type) {