diff options
| author | Connor Lane Smith <cls@lubutu.com> | 2011-09-30 21:08:37 +0100 |
|---|---|---|
| committer | Connor Lane Smith <cls@lubutu.com> | 2011-09-30 21:08:37 +0100 |
| commit | e30ad490b2b9048bc7e70fc81f0be2b378985f89 (patch) | |
| tree | efae553d91d2d4352a67aadf6b36aa726b2c4a2e | |
| parent | 50207344084b385839cef251f77f5129dc85874e (diff) | |
fix monitor select when no focus
| -rw-r--r-- | dmenu.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -509,7 +509,7 @@ setup(void) { | |||
| 509 | XWindowAttributes wa; | 509 | XWindowAttributes wa; |
| 510 | 510 | ||
| 511 | XGetInputFocus(dc->dpy, &w, &di); | 511 | XGetInputFocus(dc->dpy, &w, &di); |
| 512 | if(w != root && XGetWindowAttributes(dc->dpy, w, &wa)) | 512 | if(w != root && w != PointerRoot && w != None && XGetWindowAttributes(dc->dpy, w, &wa)) |
| 513 | XTranslateCoordinates(dc->dpy, root, root, wa.x, wa.y, &x, &y, &dw); | 513 | XTranslateCoordinates(dc->dpy, root, root, wa.x, wa.y, &x, &y, &dw); |
| 514 | else | 514 | else |
| 515 | XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du); | 515 | XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du); |
