properly restrict bindings for motion events

This commit is contained in:
Dana Jansens 2003-03-26 11:25:19 +00:00
parent f532a746f0
commit ded198f74f

View file

@ -63,7 +63,7 @@ static void endofline()
static void addbinding()
{
Action *a;
Action *a = NULL;
MouseAction mact;
if (!g_ascii_strcasecmp(event, "press"))
@ -82,6 +82,15 @@ static void addbinding()
return;
}
if (mact == MouseAction_Motion) {
if (!g_ascii_strcasecmp(action, "move") &&
mact == MouseAction_Motion) {
a = action_new(action_move);
} else if (!g_ascii_strcasecmp(action, "resize") &&
mact == MouseAction_Motion) {
a = action_new(action_resize);
}
} else {
if (!g_ascii_strcasecmp(action, "focus")) {
a = action_new(action_focus);
} else if (!g_ascii_strcasecmp(action, "unfocus")) {
@ -176,13 +185,9 @@ static void addbinding()
} else if (!g_ascii_strcasecmp(action, "previousdesktoprowwrap")) {
a = action_new(action_previous_desktop_row);
a->data.nextprevdesktop.wrap = TRUE;
} else if (!g_ascii_strcasecmp(action, "move") &&
mact == MouseAction_Motion) {
a = action_new(action_move);
} else if (!g_ascii_strcasecmp(action, "resize") &&
mact == MouseAction_Motion) {
a = action_new(action_resize);
} else {
}
}
if (a == NULL) {
g_warning("Invalid action '%s' in '%s' on line %d", action, path,
lineno);
return;