diff options
author | garbeam@gmail.com <unknown> | 2011-06-25 09:07:28 +0100 |
---|---|---|
committer | garbeam@gmail.com <unknown> | 2011-06-25 09:07:28 +0100 |
commit | 3a392b855882786d1aa9c842d1c36b5c1cbc576a (patch) | |
tree | 03650d2f289f1caf5388211a5163a879c574c3d2 /dwm.c | |
parent | 92fe06b501a5458a6aecdcc53f8d35c2a1f55c1c (diff) | |
download | dwm-3a392b855882786d1aa9c842d1c36b5c1cbc576a.tar.gz dwm-3a392b855882786d1aa9c842d1c36b5c1cbc576a.tar.bz2 dwm-3a392b855882786d1aa9c842d1c36b5c1cbc576a.zip |
making enternotify less focus hungry
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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))); } |