mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
WPrefs: use W_KeycodeToKeysym instead of XkbKeycodeToKeysym
This patch replaces XKeycodeToKeysym and XkbKeycodeToKeysym in WPrefs by our own function W_KeycodeToKeysym.
This commit is contained in:
committed by
Carlos R. Mafra
parent
15d06ff064
commit
bc56db0776
@@ -317,11 +317,8 @@ char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
||||
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
|
||||
numlock_mask = NumLockMask(dpy);
|
||||
|
||||
if (xext_xkb_supported)
|
||||
/* conditional mask check to get numeric keypad keys */
|
||||
ksym = XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, ev.xkey.state & numlock_mask?1:0);
|
||||
else
|
||||
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, ev.xkey.state & numlock_mask?1:0);
|
||||
/* conditional mask check to get numeric keypad keys */
|
||||
ksym = W_KeycodeToKeysym(dpy, ev.xkey.keycode, ev.xkey.state & numlock_mask?1:0);
|
||||
|
||||
if (!IsModifierKey(ksym)) {
|
||||
if (convert_case) {
|
||||
|
||||
@@ -381,10 +381,7 @@ static void fillModifierPopUp(WMPopUpButton * pop)
|
||||
if (mapping->modifiermap[idx] != 0) {
|
||||
int l;
|
||||
for (l = 0; l < 4; l++) {
|
||||
if (xext_xkb_supported)
|
||||
ksym = XkbKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0, l);
|
||||
else
|
||||
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
|
||||
ksym = W_KeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
|
||||
if (ksym != NoSymbol)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <wraster.h>
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <WINGs/WINGsP.h>
|
||||
|
||||
/* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */
|
||||
#include "../src/wconfig.h"
|
||||
@@ -54,7 +55,6 @@
|
||||
/****/
|
||||
|
||||
extern char *NOptionValueChanged;
|
||||
extern Bool xext_xkb_supported;
|
||||
|
||||
typedef struct _Panel Panel;
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#endif
|
||||
|
||||
char *NOptionValueChanged = "NOptionValueChanged";
|
||||
Bool xext_xkb_supported = False;
|
||||
|
||||
|
||||
#define MAX_DEATHS 64
|
||||
|
||||
@@ -157,8 +155,6 @@ int main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
xext_xkb_supported = XkbQueryExtension(dpy, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
WMPLSetCaseSensitive(False);
|
||||
|
||||
Initialize(scr);
|
||||
|
||||
@@ -171,10 +171,7 @@ static void x_reset_modifier_mapping(Display * display)
|
||||
KeySym sym;
|
||||
|
||||
if (code) {
|
||||
if (xext_xkb_supported)
|
||||
sym = XkbKeycodeToKeysym(display, code, 0, column);
|
||||
else
|
||||
sym = XKeycodeToKeysym(display, code, column);
|
||||
sym = W_KeycodeToKeysym(display, code, column);
|
||||
} else {
|
||||
sym = NoSymbol;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user