]> git.armaanb.net Git - dwm.git/blobdiff - dwm.c
Do not allow focus to drift from fullscreen client via focusstack()
[dwm.git] / dwm.c
diff --git a/dwm.c b/dwm.c
index fb1e32634abb830aeff0f9b51e92742130cf8e44..b0b3466881b84872a6b261cc1ed42afed08ac3bd 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -440,7 +440,7 @@ buttonpress(XEvent *e)
                        arg.ui = 1 << i;
                } else if (ev->x < x + blw)
                        click = ClkLtSymbol;
-               else if (ev->x > selmon->ww - TEXTW(stext))
+               else if (ev->x > selmon->ww - (int)TEXTW(stext))
                        click = ClkStatusText;
                else
                        click = ClkWinTitle;
@@ -835,7 +835,7 @@ focusstack(const Arg *arg)
 {
        Client *c = NULL, *i;
 
-       if (!selmon->sel)
+       if (!selmon->sel || selmon->sel->isfullscreen)
                return;
        if (arg->i > 0) {
                for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next);
@@ -1689,11 +1689,13 @@ tile(Monitor *m)
                if (i < m->nmaster) {
                        h = (m->wh - my) / (MIN(n, m->nmaster) - i);
                        resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
-                       my += HEIGHT(c);
+                       if (my + HEIGHT(c) < m->wh)
+                               my += HEIGHT(c);
                } else {
                        h = (m->wh - ty) / (n - i);
                        resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
-                       ty += HEIGHT(c);
+                       if (ty + HEIGHT(c) < m->wh)
+                               ty += HEIGHT(c);
                }
 }