[tasklist] Fix focused client handling
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
70b745b315
commit
7124b8887c
|
@ -61,19 +61,12 @@ tasklist_isvisible(Client *c, int screen, ShowClient show)
|
||||||
switch(show)
|
switch(show)
|
||||||
{
|
{
|
||||||
case ShowAll:
|
case ShowAll:
|
||||||
if(c->screen == screen)
|
return (c->screen == screen);
|
||||||
return True;
|
|
||||||
break;
|
|
||||||
case ShowTags:
|
case ShowTags:
|
||||||
if(client_isvisible(c, screen))
|
return client_isvisible(c, screen);
|
||||||
return True;
|
|
||||||
break;
|
|
||||||
case ShowFocus:
|
case ShowFocus:
|
||||||
if(c == globalconf.focus->client)
|
return (c == focus_get_current_client(screen));
|
||||||
return True;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +75,6 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
Data *d = widget->data;
|
Data *d = widget->data;
|
||||||
Client *sel = focus_get_current_client(widget->statusbar->screen);
|
|
||||||
Rule *r;
|
Rule *r;
|
||||||
area_t area;
|
area_t area;
|
||||||
style_t style;
|
style_t style;
|
||||||
|
@ -119,7 +111,7 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
|
||||||
|
|
||||||
if(c->isurgent)
|
if(c->isurgent)
|
||||||
style = d->styles.urgent;
|
style = d->styles.urgent;
|
||||||
else if(sel == c)
|
else if(globalconf.focus->client == c)
|
||||||
style = d->styles.focus;
|
style = d->styles.focus;
|
||||||
else
|
else
|
||||||
style = d->styles.normal;
|
style = d->styles.normal;
|
||||||
|
|
Loading…
Reference in New Issue