summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/xkbcommon/src/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/xkbcommon/src/context.c')
-rw-r--r--src/3rdparty/xkbcommon/src/context.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/3rdparty/xkbcommon/src/context.c b/src/3rdparty/xkbcommon/src/context.c
index e9c52ebeee..50993e108a 100644
--- a/src/3rdparty/xkbcommon/src/context.c
+++ b/src/3rdparty/xkbcommon/src/context.c
@@ -75,12 +75,16 @@ err:
XKB_EXPORT int
xkb_context_include_path_append_default(struct xkb_context *ctx)
{
- const char *home;
+ const char *home, *root;
char *user_path;
int err;
int ret = 0;
- ret |= xkb_context_include_path_append(ctx, DFLT_XKB_CONFIG_ROOT);
+ root = secure_getenv("XKB_CONFIG_ROOT");
+ if (root != NULL)
+ ret |= xkb_context_include_path_append(ctx, root);
+ else
+ ret |= xkb_context_include_path_append(ctx, DFLT_XKB_CONFIG_ROOT);
home = secure_getenv("HOME");
if (!home)