Apparently, XKeycodeToKeysym() is deprecated. Since clang++ was

giving warnings about this I switched to the replacement function
XkbKeycodeToKeysym().
This commit is contained in:
Davis King 2012-05-01 20:51:37 -04:00
parent e76b0ac2e0
commit 2e7f65885b

View File

@ -13,6 +13,7 @@
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/Xlocale.h> #include <X11/Xlocale.h>
#include <X11/XKBlib.h>
#include <poll.h> #include <poll.h>
#include <iostream> #include <iostream>
#include "../assert.h" #include "../assert.h"
@ -1263,7 +1264,7 @@ namespace dlib
{ {
if ( codes[n] == 0 ) if ( codes[n] == 0 )
continue; continue;
switch(XKeycodeToKeysym( disp, codes[n], 0 )) switch(XkbKeycodeToKeysym( disp, codes[n], 0, 0 ))
{ {
case XK_Alt_L: case XK_Alt_L:
alt_mask = index_to_modmask(n / map->max_keypermod); alt_mask = index_to_modmask(n / map->max_keypermod);