sxhkd-rc

[fork] simple X hotkey daemon (but for the rc shell)
Log | Files | Refs | README | LICENSE

commit 7163c271ae3093ae031c96e830bba913a42494ba
parent 3b80a888a4a54dd74671810925c7d871794d3234
Author: Bastien Dejean <nihilhill@gmail.com>
Date:   Tue,  8 Jan 2013 13:51:30 +0100

Small optimization: check event_type first

Diffstat:
Mkeys.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/keys.c b/keys.c @@ -2651,7 +2651,7 @@ hotkey_t *make_hotkey(xcb_keysym_t keysym, xcb_button_t button, uint16_t modfiel hotkey_t *find_hotkey(xcb_keysym_t keysym, xcb_button_t button, uint16_t modfield, uint8_t event_type) { for (hotkey_t *hk = hotkeys; hk != NULL; hk = hk->next) - if (hk->keysym == keysym && hk->button == button && hk->modfield == modfield && hk->event_type == event_type) + if (hk->event_type == event_type && hk->keysym == keysym && hk->button == button && hk->modfield == modfield) return hk; return NULL; }