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);
|
XSync(display, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static xkeyentry_t *pKeysHead = NULL;
|
static xkeyentry_t *xKeysHead = NULL;
|
||||||
|
|
||||||
void XKeyEntryAdd(KeySym keysym, KeyCode keycode) {
|
void XKeyEntryAdd(KeySym keysym, KeyCode keycode) {
|
||||||
xkeyentry_t *entry = (xkeyentry_t *) malloc(sizeof(xkeyentry_t));
|
xkeyentry_t *entry = (xkeyentry_t *) malloc(sizeof(xkeyentry_t));
|
||||||
@ -78,13 +78,13 @@ void XKeyEntryAdd(KeySym keysym, KeyCode keycode) {
|
|||||||
|
|
||||||
entry->keysym = keysym;
|
entry->keysym = keysym;
|
||||||
entry->keycode = keycode;
|
entry->keycode = keycode;
|
||||||
entry->next = pKeysHead;
|
entry->next = xKeysHead;
|
||||||
pKeysHead = entry;
|
xKeysHead = entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyCode XKeyEntryGet(KeySym keysym) {
|
KeyCode XKeyEntryGet(KeySym keysym) {
|
||||||
xkeyentry_t *prev = NULL;
|
xkeyentry_t *prev = NULL;
|
||||||
xkeyentry_t *curr = pKeysHead;
|
xkeyentry_t *curr = xKeysHead;
|
||||||
|
|
||||||
KeyCode keycode = 0;
|
KeyCode keycode = 0;
|
||||||
while (curr != NULL) {
|
while (curr != NULL) {
|
||||||
@ -92,7 +92,7 @@ KeyCode XKeyEntryGet(KeySym keysym) {
|
|||||||
keycode = curr->keycode;
|
keycode = curr->keycode;
|
||||||
|
|
||||||
if (prev == NULL) {
|
if (prev == NULL) {
|
||||||
pKeysHead = curr->next;
|
xKeysHead = curr->next;
|
||||||
} else {
|
} else {
|
||||||
prev->next = curr->next;
|
prev->next = curr->next;
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ KeyCode KbdXKeysymToKeycode(Display *dpy, KeySym keysym) {
|
|||||||
XkbDescPtr xkb;
|
XkbDescPtr xkb;
|
||||||
XkbStateRec state;
|
XkbStateRec state;
|
||||||
unsigned int mods;
|
unsigned int mods;
|
||||||
unsigned keycode;
|
KeyCode keycode;
|
||||||
|
|
||||||
xkb = XkbGetMap(dpy, XkbAllComponentsMask, XkbUseCoreKbd);
|
xkb = XkbGetMap(dpy, XkbAllComponentsMask, XkbUseCoreKbd);
|
||||||
if (!xkb)
|
if (!xkb)
|
||||||
|
Loading…
Reference in New Issue
Block a user