about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/event.c b/event.c
index c59385d..3783eb4 100644
--- a/event.c
+++ b/event.c
@@ -232,7 +232,7 @@ enternotify(XEvent *e) {
 	if(ev->mode != NotifyNormal || ev->detail == NotifyInferior)
 		return;
 
-	if((c = getclient(ev->window)) || (c = getctitle(ev->window)))
+	if(((c = getclient(ev->window)) || (c = getctitle(ev->window))) && isvisible(c))
 		focus(c);
 	else if(ev->window == root) {
 		issel = True;
='#n102'>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 145 146 147 148 149 150