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 | applied Andreas Amann's patch from Oct 2010, thanks (diff) | |
| download | dwm-3a392b855882786d1aa9c842d1c36b5c1cbc576a.tar.gz 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) { | |||
| 820 | 820 | ||
| 821 | void | 821 | void |
| 822 | enternotify(XEvent *e) { | 822 | enternotify(XEvent *e) { |
| 823 | Client *c; | ||
| 823 | Monitor *m; | 824 | Monitor *m; |
| 824 | XCrossingEvent *ev = &e->xcrossing; | 825 | XCrossingEvent *ev = &e->xcrossing; |
| 825 | 826 | ||
| 826 | if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) | 827 | if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) |
| 827 | return; | 828 | return; |
| 829 | c = wintoclient(ev->window); | ||
| 828 | if((m = wintomon(ev->window)) && m != selmon) { | 830 | if((m = wintomon(ev->window)) && m != selmon) { |
| 829 | unfocus(selmon->sel, True); | 831 | unfocus(selmon->sel, True); |
| 830 | selmon = m; | 832 | selmon = m; |
| 831 | } | 833 | } |
| 834 | else if(c == selmon->sel || c == NULL) | ||
| 835 | return; | ||
| 832 | focus((wintoclient(ev->window))); | 836 | focus((wintoclient(ev->window))); |
| 833 | } | 837 | } |
| 834 | 838 | ||
