1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 21:38:00 +01:00

XKeycodeToKeysym deprecated function

The function XKeycodeToKeysym is deprecated and should be replaced
by XkbKeycodeToKeysym.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-06-24 11:11:46 +02:00
committed by Carlos R. Mafra
parent da4e4128b3
commit ebbc5c48ba
2 changed files with 4 additions and 2 deletions

View File

@@ -28,6 +28,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XKBlib.h>
#include "WindowMaker.h"
#include "actions.h"
@@ -246,7 +247,7 @@ static void updateWorkspaceMenu(WMenu * menu)
static char *getShortcutString(WShortKey key)
{
char *tmp = NULL;
char *k = XKeysymToString(XKeycodeToKeysym(dpy, key.keycode, 0));
char *k = XKeysymToString(XkbKeycodeToKeysym(dpy, key.keycode, 0, 0));
if (!k) return NULL;
char **m = wPreferences.modifier_labels;

View File

@@ -33,6 +33,7 @@ Perpetrator: Sudish Joseph <sj@eng.mindspring.net>, Sept. 1997. */
#include <strings.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <X11/XKBlib.h>
#include <WINGs/WUtil.h>
#include "xmodifier.h"
@@ -160,7 +161,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;