docs: update

This commit is contained in:
Dylan Araps 2019-10-15 13:36:28 +03:00
parent bbe9255d16
commit f46c951ad2
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 17 additions and 0 deletions

17
sowm.c
View File

@ -173,6 +173,11 @@ void notify_motion(XEvent *e) {
}
}
/*
This function initializes all key bindings defined in 'config.h'.
Simple stuff, nothing fancy or different from other window
managers happens here.
*/
void key_grab() {
KeyCode code;
@ -182,6 +187,18 @@ void key_grab() {
True, GrabModeAsync, GrabModeAsync);
}
/*
This function fires on a key press and checks to see if there
is a matching and defined key binding. If there is a match the
function bound to the key is executed.
The deprecated 'XKeycodeToKeysym' is used as the replacement
requires an additional include and I want to keep them to a
minimum.
I highly doubt this deprecated function goes away any time soon
and worst case, I simply update this code. Win-win.
*/
void key_press(XEvent *e) {
KeySym keysym = XKeycodeToKeysym(d, e->xkey.keycode, 0);