diff options
author | zachir <zachir@librem.one> | 2022-01-26 23:58:58 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2022-01-26 23:58:58 -0600 |
commit | 1fb05957ed1454c6aa97d862f3cafc5721d7e473 (patch) | |
tree | 664a94f5c4f7b96022e86071d9d1d698905eccd1 | |
parent | 1bed7cd1f6fcba4b701317bd589f13639ba6283e (diff) |
dmenu.c: fix warning about INTERSECT with bool vs int
-rw-r--r-- | dmenu.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -23,6 +23,8 @@ /* macros */ #define INTERSECT(x,y,w,h,r) (MAX(0, MIN((x)+(w),(r).x_org+(r).width) - MAX((x),(r).x_org)) \ * MAX(0, MIN((y)+(h),(r).y_org+(r).height) - MAX((y),(r).y_org))) +#define INTERSECTBOOL(x,y,w,h,r) (MAX(0, MIN((x)+(w),(r).x_org+(r).width) - MAX((x),(r).x_org)) \ + && MAX(0, MIN((y)+(h),(r).y_org+(r).height) - MAX((y),(r).y_org))) #define LENGTH(X) (sizeof X / sizeof X[0]) #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) @@ -1052,7 +1054,7 @@ setup(void) /* no focused window is on screen, so use pointer location instead */ if (mon < 0 && !area && XQueryPointer(dpy, root, &dw, &dw, &x, &y, &di, &di, &du)) for (i = 0; i < n; i++) - if (INTERSECT(x, y, 1, 1, info[i])) + if (INTERSECTBOOL(x, y, 1, 1, info[i])) break; if (centered) { |