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