summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/client.c b/client.c
index e3e31b6..487cb0c 100644
--- a/client.c
+++ b/client.c
@@ -28,13 +28,15 @@ next(Client *c)
28void 28void
29zoom(Arg *arg) 29zoom(Arg *arg)
30{ 30{
31 Client **l; 31 Client **l, *c;
32 32
33 if(!sel) 33 if(!sel)
34 return; 34 return;
35 35
36 if(sel == next(clients)) 36 if(sel == next(clients) && sel->next) {
37 sel = next(sel->next); 37 if((c = next(sel->next)))
38 sel = c;
39 }
38 40
39 for(l = &clients; *l && *l != sel; l = &(*l)->next); 41 for(l = &clients; *l && *l != sel; l = &(*l)->next);
40 *l = sel->next; 42 *l = sel->next;
@@ -497,6 +499,10 @@ resize(Client *c, Bool inc)
497 if(c->inch) 499 if(c->inch)
498 c->h -= (c->h - c->baseh) % c->inch; 500 c->h -= (c->h - c->baseh) % c->inch;
499 } 501 }
502 if(c->x > sw) /* might happen on restart */
503 c->x = sw - c->w;
504 if(c->y > sh)
505 c->ty = c->y = sh - c->h;
500 if(c->minw && c->w < c->minw) 506 if(c->minw && c->w < c->minw)
501 c->w = c->minw; 507 c->w = c->minw;
502 if(c->minh && c->h < c->minh) 508 if(c->minh && c->h < c->minh)