handle focus history on arrange()
This commit is contained in:
parent
485614f2df
commit
6f1e1e1abe
3
client.c
3
client.c
|
@ -150,6 +150,7 @@ client_unfocus(Client *c)
|
|||
XSetWindowBorder(globalconf.display, c->win,
|
||||
globalconf.screens[c->screen].colors_normal[ColBorder].pixel);
|
||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||
focus_add_client(NULL);
|
||||
}
|
||||
|
||||
/** Ban client and unmap it
|
||||
|
@ -187,10 +188,10 @@ focus(Client *c, int screen)
|
|||
client_unfocus(globalconf.focus->client);
|
||||
|
||||
/* save sel in focus history */
|
||||
focus_add_client(c);
|
||||
|
||||
if(c)
|
||||
{
|
||||
focus_add_client(c);
|
||||
XSetWindowBorder(globalconf.display, c->win,
|
||||
globalconf.screens[screen].colors_selected[ColBorder].pixel);
|
||||
XSetInputFocus(globalconf.display, c->win, RevertToPointerRoot, CurrentTime);
|
||||
|
|
5
layout.c
5
layout.c
|
@ -81,6 +81,11 @@ arrange(int screen)
|
|||
if(!globalconf.screens[screen].allow_lower_floats)
|
||||
layout_raise_floatings(screen);
|
||||
|
||||
/* if we have a valid client that could be focused but currently no window
|
||||
* are focused, then set the focus on this window */
|
||||
if((c = focus_get_current_client(screen)) && !globalconf.focus->client)
|
||||
focus(c, screen);
|
||||
|
||||
/* reset status */
|
||||
globalconf.screens[screen].need_arrange = False;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue