Use XkbKeycodeToKeysym() in stead of XKeycodeToKeysym().

XKeycodeToKeysym() is deprecated.
This commit is contained in:
Kim Woelders 2013-02-12 20:07:39 +01:00
parent 4b8c039cb7
commit 18625ec515
1 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@
#include <string.h>
#include <sys/stat.h>
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
#include <gdk/gdkx.h>
#include <unistd.h>
@ -258,8 +259,8 @@ e_cb_key_change(GtkWidget * widget __UNUSED__, gpointer data __UNUSED__)
#else
gdk_keyboard_ungrab(gdk_time_get());
#endif
key = XKeysymToString(XKeycodeToKeysym(GDK_DISPLAY(),
ev.xkey.keycode, 0));
key = XKeysymToString(XkbKeycodeToKeysym(GDK_DISPLAY(),
ev.xkey.keycode, 0, 0));
gtk_entry_set_text(GTK_ENTRY(act_key), key);
gtk_clist_set_text(GTK_CLIST(clist), last_row, 1, key);
}