Use XkbKeycodeToKeysym() in stead of XKeycodeToKeysym().
XKeycodeToKeysym() is deprecated.
This commit is contained in:
parent
4b8c039cb7
commit
18625ec515
5
viewer.c
5
viewer.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue