[hackers] [dmenu] fix monitor select when no focus || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Fri, 30 Sep 2011 22:11:00 +0200 (CEST)

changeset: 442:057817014252
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Fri Sep 30 21:08:37 2011 +0100
files: dmenu.c
description:
fix monitor select when no focus


diff -r d04fe7c27952 -r 057817014252 dmenu.c
--- a/dmenu.c Tue Sep 20 00:11:01 2011 +0100
+++ b/dmenu.c Fri Sep 30 21:08:37 2011 +0100
_AT_@ -509,7 +509,7 @@
                 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);
Received on Fri Sep 30 2011 - 22:11:00 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 30 2011 - 22:12:05 CEST