I have a potential fix but it has only received very light testing. First, we need to replace the sakura_tokeycode macro with a function:
static guint sakura_tokeycode (guint key) { GdkKeymap *keymap = gdk_keymap_get_default(); GdkKeymapKey *keys; gint n_keys; guint res = 0;
if (gdk_keymap_get_entries_for_keyval(keymap, key, &keys, &n_keys)) { if (n_keys > 0) { res = keys[0].keycode; } g_free(keys); }
return res; }
We then have to remove the X11 includes:
#include <X11/Xlib.h> #include <gdk/gdkx.h> -> #include <gdk/gdk.h>
We also have to remove the dpy member from the sakura structure.
Hope it helps
I have a potential fix but it has only received very light testing. First, we need to replace the sakura_tokeycode macro with a function:
static guint get_default( );
sakura_tokeycode (guint key) {
GdkKeymap *keymap = gdk_keymap_
GdkKeymapKey *keys;
gint n_keys;
guint res = 0;
if (gdk_keymap_ get_entries_ for_keyval( keymap, key,
&keys, &n_keys)) {
g_free( keys);
if (n_keys > 0) {
res = keys[0].keycode;
}
}
return res;
}
We then have to remove the X11 includes:
#include <X11/Xlib.h>
#include <gdk/gdkx.h> -> #include <gdk/gdk.h>
We also have to remove the dpy member from the sakura structure.
Hope it helps