XQueryKeymap -> TSXQueryKeymap (fixes the XIO errors reported).
diff --git a/include/ts_xlib.h b/include/ts_xlib.h
index 5a100f9..43e390c 100644
--- a/include/ts_xlib.h
+++ b/include/ts_xlib.h
@@ -93,6 +93,7 @@
extern int TSXPutBackEvent(Display*, XEvent*);
extern int TSXPutImage(Display*, Drawable, GC, XImage*, int, int, int, int, unsigned int, unsigned int);
extern int TSXQueryColor(Display*, Colormap, XColor*);
+extern int TSXQueryKeymap(Display*, char*);
extern int TSXQueryPointer(Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*);
extern int TSXQueryTree(Display*, Window, Window*, Window*, Window**, unsigned int*);
extern int TSXResetScreenSaver(Display*);
diff --git a/tools/make_X11wrappers b/tools/make_X11wrappers
index 1a1c08b..cfbe899 100755
--- a/tools/make_X11wrappers
+++ b/tools/make_X11wrappers
@@ -173,6 +173,9 @@
}
if(m'\s*([^,]*[^, \t])\s*(,?\n)') {
$args[$#args+1] = $1;
+ if ($1 =~ /char\s*\[/) { # small hack for XQueryKeymap
+ $args[$#args] = "char*";
+ }
}
}
# Skip if vararg, function pointer arg, or not needed.
diff --git a/tsx11/X11_calls b/tsx11/X11_calls
index 3fe2370..6e930a2 100644
--- a/tsx11/X11_calls
+++ b/tsx11/X11_calls
@@ -101,6 +101,7 @@
XPutBackEvent
XPutImage
XQueryColor
+XQueryKeymap
XQueryPointer
XQueryTree
XReconfigureWMWindow
diff --git a/tsx11/ts_xlib.c b/tsx11/ts_xlib.c
index 117c736..f34546c 100644
--- a/tsx11/ts_xlib.c
+++ b/tsx11/ts_xlib.c
@@ -908,6 +908,17 @@
return r;
}
+int TSXQueryKeymap(Display* a0, char* a1)
+{
+ int r;
+ TRACE(x11, "Call XQueryKeymap\n");
+ EnterCriticalSection( &X11DRV_CritSection );
+ r = XQueryKeymap(a0, a1);
+ LeaveCriticalSection( &X11DRV_CritSection );
+ TRACE(x11, "Ret XQueryKeymap\n");
+ return r;
+}
+
int TSXQueryPointer(Display* a0, Window a1, Window* a2, Window* a3, int* a4, int* a5, int* a6, int* a7, unsigned int* a8)
{
int r;
diff --git a/windows/keyboard.c b/windows/keyboard.c
index a532386..850e95d 100644
--- a/windows/keyboard.c
+++ b/windows/keyboard.c
@@ -449,7 +449,7 @@
KEYLP keylp;
TRACE(keyboard,"called\n");
- if (!XQueryKeymap(display, keys_return)) {
+ if (!TSXQueryKeymap(display, keys_return)) {
ERR(keyboard,"Error getting keymap !");
return;
}