aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2011-09-30 21:08:37 +0100
committerConnor Lane Smith <cls@lubutu.com>2011-09-30 21:08:37 +0100
commite30ad490b2b9048bc7e70fc81f0be2b378985f89 (patch)
treeefae553d91d2d4352a67aadf6b36aa726b2c4a2e
parent50207344084b385839cef251f77f5129dc85874e (diff)
downloaddmenu-e30ad490b2b9048bc7e70fc81f0be2b378985f89.tar.gz
dmenu-e30ad490b2b9048bc7e70fc81f0be2b378985f89.tar.bz2
dmenu-e30ad490b2b9048bc7e70fc81f0be2b378985f89.zip
fix monitor select when no focus
-rw-r--r--dmenu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index 9d479f9..458f5ab 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -509,7 +509,7 @@ setup(void) {
XWindowAttributes wa;
XGetInputFocus(dc->dpy, &w, &di);
- if(w != root && XGetWindowAttributes(dc->dpy, w, &wa))
+ if(w != root && w != PointerRoot && w != None && XGetWindowAttributes(dc->dpy, w, &wa))
XTranslateCoordinates(dc->dpy, root, root, wa.x, wa.y, &x, &y, &dw);
else
XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du);