fix segfault in client_zoom
This commit is contained in:
parent
06904cfcaa
commit
a26b40fa28
9
client.c
9
client.c
|
@ -1002,17 +1002,20 @@ uicb_client_zoom(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *c, *sel = globalconf.focus->client;
|
Client *c, *sel = globalconf.focus->client;
|
||||||
|
|
||||||
|
if(!sel)
|
||||||
|
return;
|
||||||
|
|
||||||
for(c = globalconf.clients; !client_isvisible(c, screen); c = c->next);
|
for(c = globalconf.clients; !client_isvisible(c, screen); c = c->next);
|
||||||
if(c == sel)
|
if(c == sel)
|
||||||
for(sel = sel->next; sel && !client_isvisible(sel, screen); sel = sel->next);
|
for(sel = sel->next; sel && !client_isvisible(sel, screen); sel = sel->next);
|
||||||
|
|
||||||
if(!sel)
|
if(sel)
|
||||||
return;
|
{
|
||||||
|
|
||||||
client_list_detach(&globalconf.clients, sel);
|
client_list_detach(&globalconf.clients, sel);
|
||||||
client_list_push(&globalconf.clients, sel);
|
client_list_push(&globalconf.clients, sel);
|
||||||
globalconf.screens[screen].need_arrange = True;
|
globalconf.screens[screen].need_arrange = True;
|
||||||
globalconf.drop_events |= EnterWindowMask;
|
globalconf.drop_events |= EnterWindowMask;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Send focus to next client in stack
|
/** Send focus to next client in stack
|
||||||
|
|
Loading…
Reference in New Issue