summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-17 14:39:22 -0700
committerKeith Packard <keithp@keithp.com>2012-07-17 14:39:22 -0700
commit6b6bf669e15d0f89d27a83e77a957edcca91bb0c (patch)
treeb274045c44b7cc9f598aa5fd3e26ac91d5ccfc91
parentc6af49a620f5c11f154b250e0cd28f941daa8248 (diff)
Add '-xserver-keymap-dir' option to print .xkm file directory and exitxkbcomp-cache
This can be used by xkb file packages to clear any cached files when new xkb configuration files are installed. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--man/Xserver.man6
-rw-r--r--xkb/xkbInit.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/man/Xserver.man b/man/Xserver.man
index 8d243d6b7..86d715636 100644
--- a/man/Xserver.man
+++ b/man/Xserver.man
@@ -410,6 +410,12 @@ elapse between autorepeat-generated keystrokes).
.TP 8
.B \-xkbmap \fIfilename\fP
loads keyboard description in \fIfilename\fP on server startup.
+.TP 8
+.B \-xserver-keymap-dir
+displays the directory used to hold compiled keymap files. The *.xkm
+files in this directory should be removed whenever the xkb source
+files change as the X server may cache compiled keymaps there to speed
+server startup.
.SH "NETWORK CONNECTIONS"
The X server supports client connections via a platform-dependent subset of
the following transport types: TCP\/IP, Unix Domain sockets, DECnet,
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 4e8e267da..437b2601e 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -751,6 +751,10 @@ XkbProcessArguments(int argc, char *argv[], int i)
XkbDfltRepeatInterval = (long) atoi(argv[i]);
return 2;
}
+ if ((strcmp(argv[i], "-xserver-keymap-dir") == 0)) { /* -xserver-keymap-dir */
+ printf ("%s\n", XKM_OUTPUT_DIR);
+ exit(0);
+ }
return 0;
}