diff options
| -rw-r--r-- | event.c | 7 |
1 files changed, 2 insertions, 5 deletions
| @@ -234,9 +234,7 @@ enternotify(XEvent *e) { | |||
| 234 | focus(c); | 234 | focus(c); |
| 235 | else if(ev->window == root) { | 235 | else if(ev->window == root) { |
| 236 | issel = True; | 236 | issel = True; |
| 237 | XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | 237 | focus(sel); |
| 238 | if(sel) | ||
| 239 | focus(sel); | ||
| 240 | } | 238 | } |
| 241 | } | 239 | } |
| 242 | 240 | ||
| @@ -273,8 +271,7 @@ leavenotify(XEvent *e) { | |||
| 273 | XCrossingEvent *ev = &e->xcrossing; | 271 | XCrossingEvent *ev = &e->xcrossing; |
| 274 | 272 | ||
| 275 | if((ev->window == root) && !ev->same_screen) { | 273 | if((ev->window == root) && !ev->same_screen) { |
| 276 | if(sel) | 274 | focus(NULL); |
| 277 | focus(NULL); | ||
| 278 | issel = False; | 275 | issel = False; |
| 279 | } | 276 | } |
| 280 | } | 277 | } |
