[widgets] Cosmetic, and allow more bindings in tasklist

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-02 10:11:38 +02:00
parent d5859c60f7
commit a3a47d718e
3 changed files with 3 additions and 13 deletions

View File

@ -39,10 +39,7 @@ focusicon_draw(widget_t *widget, draw_context_t *ctx, int offset,
NetWMIcon *icon;
if(!sel)
{
widget->area.width = 0;
return 0;
}
return (widget->area.width = 0);
widget->area.height = widget->statusbar->height;
@ -66,10 +63,7 @@ focusicon_draw(widget_t *widget, draw_context_t *ctx, int offset,
}
if(!(icon = ewmh_get_window_icon(sel->win)))
{
widget->area.width = 0;
return 0;
}
return (widget->area.width = 0);
widget->area.width = ((double) widget->statusbar->height / (double) icon->height) * icon->width;

View File

@ -250,10 +250,7 @@ tasklist_button_press(widget_t *widget, xcb_button_press_event_t *ev)
for(b = widget->buttons; b; b = b->next)
if(ev->detail == b->button && CLEANMASK(ev->state) == b->mod && b->func)
{
b->func(widget->statusbar->screen, b->arg);
return;
}
}
widget_t *

View File

@ -69,7 +69,6 @@ textbox_tell(widget_t *widget, char *property, char *new_value)
if(!a_strcmp(property, "text"))
{
if (d->text)
p_delete(&d->text);
d->text = a_strdup(new_value);
}