[widgets] Cosmetic, and allow more bindings in tasklist
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d5859c60f7
commit
a3a47d718e
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -69,8 +69,7 @@ textbox_tell(widget_t *widget, char *property, char *new_value)
|
|||
|
||||
if(!a_strcmp(property, "text"))
|
||||
{
|
||||
if (d->text)
|
||||
p_delete(&d->text);
|
||||
p_delete(&d->text);
|
||||
d->text = a_strdup(new_value);
|
||||
}
|
||||
else if(!a_strcmp(property, "width"))
|
||||
|
|
Loading…
Reference in New Issue