Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
applied sanders patch to remove unnecessary commit()
[dwm.git]
/
view.c
diff --git
a/view.c
b/view.c
index
5de34c0
..
aa0a23a
100644
(file)
--- a/
view.c
+++ b/
view.c
@@
-67,7
+67,9
@@
dofloat(Arg *arg)
else
ban(c);
}
else
ban(c);
}
- if((sel = getnext(clients)))
+ if(!sel || !isvisible(sel))
+ sel = getnext(clients);
+ if(sel)
focus(sel);
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
focus(sel);
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
@@
-130,7
+132,9
@@
dotile(Arg *arg)
else
ban(c);
}
else
ban(c);
}
- if((sel = getnext(clients)))
+ if(!sel || !isvisible(sel))
+ sel = getnext(clients);
+ if(sel)
focus(sel);
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
focus(sel);
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
@@
-261,7
+265,6
@@
void
view(Arg *arg)
{
unsigned int i;
view(Arg *arg)
{
unsigned int i;
- Client *c;
for(i = 0; i < ntags; i++)
seltag[i] = False;
for(i = 0; i < ntags; i++)
seltag[i] = False;