Add a --border flag to enable mouse binds to trigger on border click

This commit is contained in:
Deiz
2015-04-01 21:43:46 -04:00
parent 9eba4eecb7
commit ce48d5c5d7
8 changed files with 34 additions and 18 deletions

View File

@ -49,10 +49,12 @@ static struct Mode *mode_from_name(const char *name) {
*
*/
Binding *configure_binding(const char *bindtype, const char *modifiers, const char *input_code,
const char *release, const char *whole_window, const char *command, const char *modename) {
const char *release, const char *border, const char *whole_window,
const char *command, const char *modename) {
Binding *new_binding = scalloc(sizeof(Binding));
DLOG("bindtype %s, modifiers %s, input code %s, release %s\n", bindtype, modifiers, input_code, release);
new_binding->release = (release != NULL ? B_UPON_KEYRELEASE : B_UPON_KEYPRESS);
new_binding->border = (border != NULL);
new_binding->whole_window = (whole_window != NULL);
if (strcmp(bindtype, "bindsym") == 0) {
new_binding->input_type = (strncasecmp(input_code, "button", (sizeof("button") - 1)) == 0