aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c7
-rw-r--r--ui/sdl.c10
2 files changed, 10 insertions, 7 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 640ff84368..a86848f3b0 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2201,11 +2201,12 @@ static void gd_set_keycode_type(GtkDisplayState *s)
GdkDisplay *display = gtk_widget_get_display(s->window);
if (GDK_IS_X11_DISPLAY(display)) {
Display *x11_display = gdk_x11_display_get_xdisplay(display);
- XkbDescPtr desc = XkbGetKeyboard(x11_display, XkbGBN_AllComponentsMask,
- XkbUseCoreKbd);
+ XkbDescPtr desc = XkbGetMap(x11_display, XkbGBN_AllComponentsMask,
+ XkbUseCoreKbd);
char *keycodes = NULL;
- if (desc && desc->names) {
+ if (desc &&
+ (XkbGetNames(x11_display, XkbKeycodesNameMask, desc) == Success)) {
keycodes = XGetAtomName(x11_display, desc->names->keycodes);
}
if (keycodes == NULL) {
diff --git a/ui/sdl.c b/ui/sdl.c
index 19e8a848a7..37c21a00fb 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -233,10 +233,12 @@ static int check_for_evdev(void)
if (!SDL_GetWMInfo(&info)) {
return 0;
}
- desc = XkbGetKeyboard(info.info.x11.display,
- XkbGBN_AllComponentsMask,
- XkbUseCoreKbd);
- if (desc && desc->names) {
+ desc = XkbGetMap(info.info.x11.display,
+ XkbGBN_AllComponentsMask,
+ XkbUseCoreKbd);
+ if (desc &&
+ (XkbGetNames(info.info.x11.display,
+ XkbKeycodesNameMask, desc) == Success)) {
keycodes = XGetAtomName(info.info.x11.display, desc->names->keycodes);
if (keycodes == NULL) {
fprintf(stderr, "could not lookup keycode name\n");