[PATCH] Add '-xserver-keymap-dir' option to print .xkm file directory and exit
Keith Packard
keithp at keithp.com
Tue Jul 17 14:41:25 PDT 2012
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 at keithp.com>
---
man/Xserver.man | 6 ++++++
xkb/xkbInit.c | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/man/Xserver.man b/man/Xserver.man
index 8d243d6..86d7156 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 4e8e267..437b260 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;
}
--
1.7.10.4
More information about the xorg-devel
mailing list