From 7124b8887c2d402477456a3263c8b81051d0c346 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 7 Apr 2008 20:34:42 +0200 Subject: [PATCH] [tasklist] Fix focused client handling Signed-off-by: Julien Danjou --- widgets/tasklist.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/widgets/tasklist.c b/widgets/tasklist.c index bcecec123..7cffe8ce6 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -61,19 +61,12 @@ tasklist_isvisible(Client *c, int screen, ShowClient show) switch(show) { case ShowAll: - if(c->screen == screen) - return True; - break; + return (c->screen == screen); case ShowTags: - if(client_isvisible(c, screen)) - return True; - break; + return client_isvisible(c, screen); case ShowFocus: - if(c == globalconf.focus->client) - return True; - break; + return (c == focus_get_current_client(screen)); } - return False; } @@ -82,7 +75,6 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used) { Client *c; Data *d = widget->data; - Client *sel = focus_get_current_client(widget->statusbar->screen); Rule *r; area_t area; style_t style; @@ -119,7 +111,7 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used) if(c->isurgent) style = d->styles.urgent; - else if(sel == c) + else if(globalconf.focus->client == c) style = d->styles.focus; else style = d->styles.normal;