about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index 84c0ae6..8c1adeb 100644
--- a/dwm.c
+++ b/dwm.c
@@ -820,15 +820,19 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert) {
 
 void
 enternotify(XEvent *e) {
+	Client *c;
 	Monitor *m;
 	XCrossingEvent *ev = &e->xcrossing;
 
 	if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
 		return;
+	c = wintoclient(ev->window);
 	if((m = wintomon(ev->window)) && m != selmon) {
 		unfocus(selmon->sel, True);
 		selmon = m;
 	}
+	else if(c == selmon->sel || c == NULL)
+		return;
 	focus((wintoclient(ev->window)));
 }
 
ter Drew DeVault <sir@cmpwn.com> 2019-05-18 15:34:16 -0400 Fix scdoc & gofmt issues' href='/akspecs/aerc/commit/doc/aerc-smtp.5.scd?h=0.6.0&id=ca2cd00fe75863002145afcbfad1fe03f6258cfc'>ca2cd00 ^
b820850 ^
fc719e4 ^

4875813 ^
fc719e4 ^





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