1
0
mirror of https://github.com/dylanaraps/sowm.git synced 2025-08-13 11:15:45 -07:00

sowm: check mod first.

This commit is contained in:
Dylan Araps
2019-10-19 23:29:21 +03:00
parent 2d1e5c2654
commit 144c153844

2
sowm.c

@@ -110,7 +110,7 @@ void key_press(XEvent *e) {
KeySym keysym = XKeycodeToKeysym(d, e->xkey.keycode, 0);
for (unsigned int i=0; i < sizeof(keys)/sizeof(*keys); ++i)
if (keys[i].keysym == keysym && keys[i].mod == e->xkey.state)
if (keys[i].mod == e->xkey.state && keys[i].keysym == keysym)
keys[i].function(keys[i].arg);
}