From 43c3526d2120712f72579398b73ef92283d9078b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sun, 15 Jul 2012 10:54:44 +0200 Subject: [PATCH] WPrefs: XKeycodeToKeysym deprecated function The function XKeycodeToKeysym is deprecated and should be replaced by XkbKeycodeToKeysym. --- WPrefs.app/KeyboardShortcuts.c | 3 ++- WPrefs.app/MouseSettings.c | 3 ++- WPrefs.app/xmodifier.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c index 5718653d..00c5e3ee 100644 --- a/WPrefs.app/KeyboardShortcuts.c +++ b/WPrefs.app/KeyboardShortcuts.c @@ -25,6 +25,7 @@ #include #include +#include typedef struct _Panel { WMBox *box; @@ -242,7 +243,7 @@ char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case) XAllowEvents(dpy, AsyncKeyboard, CurrentTime); WMNextEvent(dpy, &ev); if (ev.type == KeyPress && ev.xkey.keycode != 0) { - ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, 0); + ksym = XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, 0); if (!IsModifierKey(ksym)) { if (convert_case) { XConvertCase(ksym, &lksym, &uksym); diff --git a/WPrefs.app/MouseSettings.c b/WPrefs.app/MouseSettings.c index b1ed9fc2..ca709e59 100644 --- a/WPrefs.app/MouseSettings.c +++ b/WPrefs.app/MouseSettings.c @@ -23,6 +23,7 @@ #include "WPrefs.h" #include +#include #include #include @@ -361,7 +362,7 @@ static void fillModifierPopUp(WMPopUpButton * pop) if (mapping->modifiermap[idx] != 0) { int l; for (l = 0; l < 4; l++) { - ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], l); + ksym = XkbKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0, l); if (ksym != NoSymbol) break; } diff --git a/WPrefs.app/xmodifier.c b/WPrefs.app/xmodifier.c index 35046f2b..97326062 100644 --- a/WPrefs.app/xmodifier.c +++ b/WPrefs.app/xmodifier.c @@ -35,6 +35,7 @@ Perpetrator: Sudish Joseph , Sept. 1997. */ #include #include #include +#include #include @@ -159,7 +160,7 @@ static void x_reset_modifier_mapping(Display * display) for (column = 0; column < 4; column += 2) { KeyCode code = x_modifier_keymap->modifiermap[modifier_index * mkpm + modifier_key]; - KeySym sym = (code ? XKeycodeToKeysym(display, code, column) : 0); + KeySym sym = (code ? XkbKeycodeToKeysym(display, code, 0, column) : 0); if (sym == last_sym) continue; last_sym = sym; -- 2.11.4.GIT