about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-01-23 12:00:49 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-01-23 12:00:49 +0100
commit17ec726b494c2ee6e6b5dbe00bb83b2d931b3fc0 (patch)
treed42812e3d2cc53d435abc200b0aa77a7ba331895
parent373b11de11fd5cee875ef521e3ac0527565c4721 (diff)
downloaddwm-17ec726b494c2ee6e6b5dbe00bb83b2d931b3fc0.tar.gz
this version should also work with cornercases (like unmanage during !issel, etc.)
-rw-r--r--client.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/client.c b/client.c
index 5309d0e..5c69718 100644
--- a/client.c
+++ b/client.c
@@ -79,15 +79,16 @@ configure(Client *c) {
 
 void
 focus(Client *c) {
-	Client *old = sel;
-
 	if(c && !isvisible(c))
 		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;
@@ -96,9 +97,8 @@ focus(Client *c) {
 		XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
 		XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
 	}
-	else if(issel)
+	else
 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
-	sel = c;
 	drawstatus();
 }
 
lt;hut@lavabit.com> 2009-12-25 21:55:04 +0100 updated pydoc pages' href='/akspecs/ranger/commit/doc/ranger.ext.openstruct.html?h=v1.2.0&id=f07bb12fc5c59430e995a64956b36331ce3629b9'>f07bb12f ^
62cd83ba ^
f07bb12f ^









62cd83ba ^
f07bb12f ^
62cd83ba ^










f07bb12f ^








62cd83ba ^






































































c776804d ^
62cd83ba ^
c776804d ^
62cd83ba ^

f07bb12f ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144