about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorarg@10ksloc.org <unknown>2006-08-02 11:28:27 +0200
committerarg@10ksloc.org <unknown>2006-08-02 11:28:27 +0200
commit1d852259526e41ebaad7325ee42c118b1cc12f71 (patch)
tree9d9992c1595caf5e9d190dd404c091437677362c
parent3af6434085aee75bd90e22aee95419dc0ae0b969 (diff)
downloaddwm-1d852259526e41ebaad7325ee42c118b1cc12f71.tar.gz
implemented focus on enterwindow on titlebars
-rw-r--r--client.c2
-rw-r--r--event.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/client.c b/client.c
index 434a93b..6f6ed99 100644
--- a/client.c
+++ b/client.c
@@ -230,7 +230,7 @@ manage(Window w, XWindowAttributes *wa)
 	XGetTransientForHint(dpy, c->win, &trans);
 	twa.override_redirect = 1;
 	twa.background_pixmap = ParentRelative;
-	twa.event_mask = ExposureMask;
+	twa.event_mask = ExposureMask | EnterWindowMask;
 
 	c->title = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th,
 			0, DefaultDepth(dpy, screen), CopyFromParent,
diff --git a/event.c b/event.c
index 0359971..a961e5c 100644
--- a/event.c
+++ b/event.c
@@ -202,7 +202,7 @@ enternotify(XEvent *e)
 	if(ev->detail == NotifyInferior)
 		return;
 
-	if((c = getclient(ev->window)))
+	if((c = getclient(ev->window)) || (c = getctitle(ev->window)))
 		focus(c);
 	else if(ev->window == root)
 		issel = True;
' href='#n159'>159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290