Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Small refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bert committed Aug 18, 2011
1 parent 5c77e1a commit 27591b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions events.c
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions types.h
Expand Up @@ -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 */

0 comments on commit 27591b5

Please sign in to comment.