Giving "@im=none" to XSetLocaleModifiers instead of an empty string
permits wc.ime.xic to be set, and thus enable usage of XmbLookupString
instead of XLookupString in kpress function.
With XmbLookupString, usage of deadkeys has now expected behaviour: for
example, with a french keyboard layout, typing '^' then 'e' gives "ê"
instead of "^e".
---
x.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/x.c b/x.c
index 120e495..23162ec 100644
--- a/x.c
+++ b/x.c
@@ -1160,6 +1160,11 @@ xinit(int cols, int rows)
xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap);
/* input methods */
+ if (!XSetLocaleModifiers("@im=none")) {
+ fprintf(stderr, "XSetLocaleModifiers: "
+ "Could not set @im=none.\n");
+ }
+
if (!ximopen(xw.dpy)) {
XRegisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL,
ximinstantiate, NULL);
@@ -2050,7 +2055,6 @@ run:
opt_title = (opt_line || !opt_cmd) ? "st" : opt_cmd[0];
setlocale(LC_CTYPE, "");
- XSetLocaleModifiers("");
cols = MAX(cols, 1);
rows = MAX(rows, 1);
tnew(cols, rows);
--
2.26.2