Add an argument to the callbacks to pass the xevent context, button or

key press. This allows to remove a few hacks to duplicate functions only
for behaviour changes; now differing behaviours are pushed down to the
callback. Also will allow for previously unavailable actions to be bind-able
down the road.
This commit is contained in:
okan
2016-10-06 14:41:19 +00:00
parent 66f5360fd4
commit 987ee736b9
5 changed files with 82 additions and 87 deletions

View File

@@ -244,7 +244,7 @@ xev_handle_buttonpress(XEvent *ee)
return;
}
(*mb->callback)(cc, &mb->argument);
(*mb->callback)(cc, &mb->argument, CWM_BTN);
}
static void
@@ -298,7 +298,7 @@ xev_handle_keypress(XEvent *ee)
return;
}
(*kb->callback)(cc, &kb->argument);
(*kb->callback)(cc, &kb->argument, CWM_KEY);
}
/*