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:
committed by
Carlos R. Mafra
parent
da4e4128b3
commit
ebbc5c48ba
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/XKBlib.h>
|
||||||
|
|
||||||
#include "WindowMaker.h"
|
#include "WindowMaker.h"
|
||||||
#include "actions.h"
|
#include "actions.h"
|
||||||
@@ -246,7 +247,7 @@ static void updateWorkspaceMenu(WMenu * menu)
|
|||||||
static char *getShortcutString(WShortKey key)
|
static char *getShortcutString(WShortKey key)
|
||||||
{
|
{
|
||||||
char *tmp = NULL;
|
char *tmp = NULL;
|
||||||
char *k = XKeysymToString(XKeycodeToKeysym(dpy, key.keycode, 0));
|
char *k = XKeysymToString(XkbKeycodeToKeysym(dpy, key.keycode, 0, 0));
|
||||||
if (!k) return NULL;
|
if (!k) return NULL;
|
||||||
|
|
||||||
char **m = wPreferences.modifier_labels;
|
char **m = wPreferences.modifier_labels;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ Perpetrator: Sudish Joseph <sj@eng.mindspring.net>, Sept. 1997. */
|
|||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
#include <X11/XKBlib.h>
|
||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
#include "xmodifier.h"
|
#include "xmodifier.h"
|
||||||
@@ -160,7 +161,7 @@ static void x_reset_modifier_mapping(Display * display)
|
|||||||
for (column = 0; column < 4; column += 2) {
|
for (column = 0; column < 4; column += 2) {
|
||||||
KeyCode code = x_modifier_keymap->modifiermap[modifier_index * mkpm
|
KeyCode code = x_modifier_keymap->modifiermap[modifier_index * mkpm
|
||||||
+ modifier_key];
|
+ modifier_key];
|
||||||
KeySym sym = (code ? XKeycodeToKeysym(display, code, column) : 0);
|
KeySym sym = (code ? XkbKeycodeToKeysym(display, code, 0, column) : 0);
|
||||||
if (sym == last_sym)
|
if (sym == last_sym)
|
||||||
continue;
|
continue;
|
||||||
last_sym = sym;
|
last_sym = sym;
|
||||||
|
|||||||
Reference in New Issue
Block a user