We're already using the Xkb functions anyway, so we may as well use
XkbKeycodeToKeysym and silence the XKeycodeToKeysym deprecation warning.

Signed-off-by: Jason Gerecke <killert...@gmail.com>
---
Changes from v1:
 * Swapped argument order in first hunk (Keycodes and groups and shift 
   levels! Oh my!)
 * Use 'state.group' rather than '0' as the group of interest

 tools/xsetwacom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 508326e..0242274 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -1087,7 +1087,7 @@ static int keysym_to_keycode(Display *dpy, KeySym sym)
                int i;
 
                for (i = 0; i < XkbKeyGroupWidth(xkb, kc, state.group); i++)
-                       if (XKeycodeToKeysym(dpy, kc, i) == sym)
+                       if (XkbKeycodeToKeysym(dpy, kc, state.group, i) == sym)
                                goto out;
        }
 
@@ -1904,7 +1904,7 @@ static int get_actions(Display *dpy, XDevice *dev,
                                if (last_type != current_type)
                                        strcat(buff, "key ");
                                is_press = !!(action & AC_KEYBTNPRESS);
-                               detail = XKeycodeToKeysym(dpy, detail, 0);
+                               detail = XkbKeycodeToKeysym(dpy, detail, 0, 0);
                                break;
                        case AC_BUTTON:
                                if (last_type != current_type)
-- 
1.9.2


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to