mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
xorg fix naming & KeyCode type.
This commit is contained in:
parent
6b2b6594cd
commit
cfdcafc611
@ -68,7 +68,7 @@ void XButton(unsigned int button, int down) {
|
||||
XSync(display, 0);
|
||||
}
|
||||
|
||||
static xkeyentry_t *pKeysHead = NULL;
|
||||
static xkeyentry_t *xKeysHead = NULL;
|
||||
|
||||
void XKeyEntryAdd(KeySym keysym, KeyCode keycode) {
|
||||
xkeyentry_t *entry = (xkeyentry_t *) malloc(sizeof(xkeyentry_t));
|
||||
@ -78,13 +78,13 @@ void XKeyEntryAdd(KeySym keysym, KeyCode keycode) {
|
||||
|
||||
entry->keysym = keysym;
|
||||
entry->keycode = keycode;
|
||||
entry->next = pKeysHead;
|
||||
pKeysHead = entry;
|
||||
entry->next = xKeysHead;
|
||||
xKeysHead = entry;
|
||||
}
|
||||
|
||||
KeyCode XKeyEntryGet(KeySym keysym) {
|
||||
xkeyentry_t *prev = NULL;
|
||||
xkeyentry_t *curr = pKeysHead;
|
||||
xkeyentry_t *curr = xKeysHead;
|
||||
|
||||
KeyCode keycode = 0;
|
||||
while (curr != NULL) {
|
||||
@ -92,7 +92,7 @@ KeyCode XKeyEntryGet(KeySym keysym) {
|
||||
keycode = curr->keycode;
|
||||
|
||||
if (prev == NULL) {
|
||||
pKeysHead = curr->next;
|
||||
xKeysHead = curr->next;
|
||||
} else {
|
||||
prev->next = curr->next;
|
||||
}
|
||||
@ -113,7 +113,7 @@ KeyCode KbdXKeysymToKeycode(Display *dpy, KeySym keysym) {
|
||||
XkbDescPtr xkb;
|
||||
XkbStateRec state;
|
||||
unsigned int mods;
|
||||
unsigned keycode;
|
||||
KeyCode keycode;
|
||||
|
||||
xkb = XkbGetMap(dpy, XkbAllComponentsMask, XkbUseCoreKbd);
|
||||
if (!xkb)
|
||||
|
Loading…
Reference in New Issue
Block a user