From 5bb69d7643374e85b3171d7ad88278aa5a1f1dd8 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 28 May 2024 10:36:40 +0200 Subject: src/keyboard-x11.c: Add ',' and '0-9' as allowed characters to regexp for XkbVariant. --- src/keyboard-x11.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/keyboard-x11.c b/src/keyboard-x11.c index aa52fbea..0c7ca55b 100644 --- a/src/keyboard-x11.c +++ b/src/keyboard-x11.c @@ -716,17 +716,17 @@ static void keyboard_init(Keyboard *self) if (bDefaultLocation) { #if GLIB_CHECK_VERSION(2, 73, 0) - pRegex = g_regex_new (" *XKBVARIANT *= *\"*([a-zA-Z]*)\"*", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, &pError); + pRegex = g_regex_new (" *XKBVARIANT *= *\"*([,a-zA-Z0-9]*)\"*", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, &pError); #else - pRegex = g_regex_new (" *XKBVARIANT *= *\"*([a-zA-Z]*)\"*", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, &pError); + pRegex = g_regex_new (" *XKBVARIANT *= *\"*([,a-zA-Z0-9]*)\"*", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, &pError); #endif } else { #if GLIB_CHECK_VERSION(2, 73, 0) - pRegex = g_regex_new (" *Option +\"*XkbVariant\"* +\"*([a-zA-Z]*)\"*", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, &pError); + pRegex = g_regex_new (" *Option +\"*XkbVariant\"* +\"*([,a-zA-Z0-9]*)\"*", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, &pError); #else - pRegex = g_regex_new (" *Option +\"*XkbVariant\"* +\"*([a-zA-Z]*)\"*", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, &pError); + pRegex = g_regex_new (" *Option +\"*XkbVariant\"* +\"*([,a-zA-Z0-9]*)\"*", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, &pError); #endif } -- cgit v1.2.3