diff options
| author | garbeam@gmail.com <unknown> | 2011-07-10 21:22:22 +0100 |
|---|---|---|
| committer | garbeam@gmail.com <unknown> | 2011-07-10 21:22:22 +0100 |
| commit | 3150a8a1beef1884365210e0e4d18b2599269a78 (patch) | |
| tree | 1cd388f28d7122a3ccb599c3fc3c7552ec0021b1 | |
| parent | removed unneeded offset recalculation, thanks Jukka, let's see if this breaks... (diff) | |
| download | dwm-3150a8a1beef1884365210e0e4d18b2599269a78.tar.gz dwm-3150a8a1beef1884365210e0e4d18b2599269a78.zip | |
applied Peters wintoclient/wintomon optimisation in enternotify()
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -827,13 +827,14 @@ enternotify(XEvent *e) { | |||
| 827 | if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) | 827 | if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) |
| 828 | return; | 828 | return; |
| 829 | c = wintoclient(ev->window); | 829 | c = wintoclient(ev->window); |
| 830 | if((m = wintomon(ev->window)) && m != selmon) { | 830 | m = c ? c->mon : wintomon(ev->window); |
| 831 | if(m != selmon) { | ||
| 831 | unfocus(selmon->sel, True); | 832 | unfocus(selmon->sel, True); |
| 832 | selmon = m; | 833 | selmon = m; |
| 833 | } | 834 | } |
| 834 | else if(c == selmon->sel || c == NULL) | 835 | else if(!c || c == selmon->sel) |
| 835 | return; | 836 | return; |
| 836 | focus((wintoclient(ev->window))); | 837 | focus(c); |
| 837 | } | 838 | } |
| 838 | 839 | ||
| 839 | void | 840 | void |
