break on first button found

This commit is contained in:
Julien Danjou 2008-01-23 08:47:46 +01:00
parent 4f2febc1a7
commit 0bbbc7c9d5
1 changed files with 3 additions and 0 deletions

View File

@ -85,7 +85,10 @@ widget_common_button_press(Widget *widget, XButtonPressedEvent *ev)
for(b = widget->buttons; b; b = b->next) for(b = widget->buttons; b; b = b->next)
if(ev->button == b->button && CLEANMASK(ev->state) == b->mod && b->func) if(ev->button == b->button && CLEANMASK(ev->state) == b->mod && b->func)
{
b->func(widget->statusbar->screen, b->arg); b->func(widget->statusbar->screen, b->arg);
break;
}
} }
static void static void