aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-08-18 12:05:38 +0200
committerBert <ber.t@gmx.com>2011-08-18 12:05:38 +0200
commit27591b5a52a4ec703bf5d2e61a4f933a7938500f (patch)
tree612ad1785b61e180167f3e86455025c247b6e132
parent5c77e1aa221c168003b673bd2d22baa090444b8e (diff)
Small refactorings
-rw-r--r--events.c6
-rw-r--r--types.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/events.c b/events.c
index df01927..01a5b92 100644
--- a/events.c
+++ b/events.c
@@ -92,7 +92,7 @@ void on_keypress(XKeyEvent *kev) {
XLookupString(kev, &key, 1, &ksym, NULL);
for (i = 0; i < LEN(keys); i++) {
- if (keymask(&keys[i], kev->state) && ksym == keys[i].ksym) {
+ if (keys[i].ksym == ksym && keymask(&keys[i], kev->state)) {
if (keys[i].handler && keys[i].handler(keys[i].arg))
redraw();
return;
@@ -111,8 +111,8 @@ void on_buttonpress(XButtonEvent *bev) {
timo_cursor = TO_CURSOR_HIDE;
for (i = 0; i < LEN(buttons); i++) {
- if (buttonmask(&buttons[i], bev->state) &&
- bev->button == buttons[i].button)
+ if (buttons[i].button == bev->button &&
+ buttonmask(&buttons[i], bev->state))
{
if (buttons[i].handler && buttons[i].handler(buttons[i].arg))
redraw();
diff --git a/types.h b/types.h
index a2b9651..950baba 100644
--- a/types.h
+++ b/types.h
@@ -27,8 +27,8 @@ typedef enum {
} cursor_t;
typedef struct {
- const char *name;
- const char *path;
+ const char *name; /* as given by user */
+ const char *path; /* always absolute */
} fileinfo_t;
#endif /* TYPES_H */