diff --git a/lib/x_util.cpp b/lib/x_util.cpp index 447de1d131..5eb5c3a855 100644 --- a/lib/x_util.cpp +++ b/lib/x_util.cpp @@ -8,8 +8,6 @@ #include #include -Display *d; - // listen for mouse motion in all windows under the given one // void listen_for_mouse(Display* display, Window window) { @@ -17,7 +15,7 @@ void listen_for_mouse(Display* display, Window window) { unsigned int nchildren; int retval; - retval = XQueryTree(d, window, &window, &parent, &children, &nchildren); + retval = XQueryTree(display, window, &window, &parent, &children, &nchildren); if (retval == FALSE) { fprintf(stderr, "XQueryTree() failed: %d\n", retval); return; @@ -26,7 +24,7 @@ void listen_for_mouse(Display* display, Window window) { if (nchildren == 0) return; XSelectInput(display, window, PointerMotionMask); for (int i=0; i