/* Try to find the mode in the list of modes and return it */
SLIST_FOREACH(mode, &modes, modes) {
- if (strcmp(mode->name, name) == 0)
+ if (strcmp(mode->name, name) == 0) {
return mode;
+ }
}
/* If the mode was not found, create a new one */
*/
Binding *configure_binding(const char *bindtype, const char *modifiers, const char *input_code,
const char *release, const char *border, const char *whole_window,
- const char *command, const char *modename, bool pango_markup) {
+ const char *exclude_titlebar, const char *command, const char *modename,
+ bool pango_markup) {
Binding *new_binding = scalloc(1, sizeof(Binding));
DLOG("Binding %p bindtype %s, modifiers %s, input code %s, release %s\n", new_binding, 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);
+ new_binding->exclude_titlebar = (exclude_titlebar != NULL);
if (strcmp(bindtype, "bindsym") == 0) {
new_binding->input_type = (strncasecmp(input_code, "button", (sizeof("button") - 1)) == 0
? B_MOUSE
}
/* Avoid duplicates. */
- for (int i = 0; i < num_max; i++) {
+ for (int i = 0; i < num; i++) {
if (buffer[i] == button)
continue;
}