pinosaur
/
dwm.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
this version should also work with cornercases (like unmanage during !issel, etc.)
[dwm.git]
/
client.c
diff --git
a/client.c
b/client.c
index
177eb94
..
5c69718
100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-79,15
+79,16
@@
configure(Client *c) {
void
focus(Client *c) {
void
focus(Client *c) {
- Client *old = sel;
-
- if(!issel || (c && !isvisible(c)))
+ if(c && !isvisible(c))
return;
return;
- if(
old && old
!= c) {
- grabbuttons(
old
, False);
- XSetWindowBorder(dpy,
old
->win, dc.norm[ColBorder]);
+ if(
sel && sel
!= c) {
+ grabbuttons(
sel
, False);
+ XSetWindowBorder(dpy,
sel
->win, dc.norm[ColBorder]);
}
}
+ sel = c;
+ if(!issel)
+ return;
if(c) {
detachstack(c);
c->snext = stack;
if(c) {
detachstack(c);
c->snext = stack;
@@
-98,7
+99,6
@@
focus(Client *c) {
}
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
}
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
- sel = c;
drawstatus();
}
drawstatus();
}