Client: When a client is deleted, his previous client take the focus.
This commit is contained in:
parent
cf96cf9715
commit
0faf031150
11
src/client.c
11
src/client.c
@ -696,6 +696,8 @@ client_unhide(Client *c)
|
||||
void
|
||||
client_unmanage(Client *c)
|
||||
{
|
||||
Client *c_next = NULL;
|
||||
|
||||
XGrabServer(dpy);
|
||||
XSetErrorHandler(errorhandlerdummy);
|
||||
XReparentWindow(dpy, c->win, ROOT, c->geo.x, c->geo.y);
|
||||
@ -712,6 +714,15 @@ client_unmanage(Client *c)
|
||||
ewmh_get_client_list();
|
||||
arrange(c->screen);
|
||||
XFree(c->title);
|
||||
|
||||
/* To focus the previous client */
|
||||
for(c_next = clients;
|
||||
c_next && c_next != c->prev && c_next->tag != c->tag && c_next->screen != c->screen;
|
||||
c_next = c_next->next);
|
||||
|
||||
if(c_next && c_next->tag == seltag[selscreen] && c_next->screen == selscreen)
|
||||
client_focus(c_next);
|
||||
|
||||
free(c);
|
||||
|
||||
return;
|
||||
|
||||
@ -245,7 +245,6 @@ uicb_menu(uicb_t cmd)
|
||||
x = sgeo[selscreen].x + conf.menu[i].x;
|
||||
y = sgeo[selscreen].y + conf.menu[i].y;
|
||||
}
|
||||
|
||||
menu_draw(conf.menu[i], x, y);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user