use focus history when focus(NULL)
This commit is contained in:
parent
3851e755df
commit
19cd145861
10
client.c
10
client.c
|
@ -223,9 +223,15 @@ focus(Client *c, Bool selscreen, int screen)
|
||||||
globalconf.screens[screen].opacity_unfocused);
|
globalconf.screens[screen].opacity_unfocused);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if c is NULL or invisible, take next client in the stack */
|
|
||||||
|
/* if c is NULL or invisible, take next client in the focus history */
|
||||||
if((!c && selscreen) || (c && !client_isvisible(c, screen)))
|
if((!c && selscreen) || (c && !client_isvisible(c, screen)))
|
||||||
|
{
|
||||||
|
c = focus_get_current_client(screen);
|
||||||
|
/* if c is still NULL take next client in the stack */
|
||||||
|
if(!c)
|
||||||
for(c = globalconf.clients; c && !client_isvisible(c, screen); c = c->next);
|
for(c = globalconf.clients; c && !client_isvisible(c, screen); c = c->next);
|
||||||
|
}
|
||||||
|
|
||||||
if(c)
|
if(c)
|
||||||
{
|
{
|
||||||
|
@ -237,7 +243,7 @@ focus(Client *c, Bool selscreen, int screen)
|
||||||
if(!selscreen)
|
if(!selscreen)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* save old sel in focus history */
|
/* save sel in focus history */
|
||||||
focus_add_client(c);
|
focus_add_client(c);
|
||||||
|
|
||||||
statusbar_draw(screen);
|
statusbar_draw(screen);
|
||||||
|
|
Loading…
Reference in New Issue