]> git.mdlowis.com Git - proto/labwc.git/commitdiff
theme: handle keys case-insensitively
authorJohan Malm <jgm323@gmail.com>
Fri, 24 Sep 2021 20:19:19 +0000 (21:19 +0100)
committerJohan Malm <jgm323@gmail.com>
Fri, 24 Sep 2021 20:19:19 +0000 (21:19 +0100)
...because this is what openbox does and some themes have capital
letters in places

src/theme.c

index f9d1802b6594b61add0f8b6ae82c8903d334892b..62c813fa3af17496c1fe6faf1b3238dfd306dae3 100644 (file)
@@ -106,7 +106,11 @@ theme_builtin(struct theme *theme)
 static bool
 match(const gchar *pattern, const gchar *string)
 {
-       return (bool)g_pattern_match_simple(pattern, string);
+       GString *p = g_string_new(pattern);
+       g_string_ascii_down(p);
+       bool ret = (bool)g_pattern_match_simple(p->str, string);
+       g_string_free(p, true);
+       return ret;
 }
 
 static void