diff options
author | Connor Lane Smith <cls@lubutu.com> | 2011-05-12 13:17:41 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2011-05-12 13:17:41 +0100 |
commit | 86019c58555b5d9514cfe2eba14248588a812f16 (patch) | |
tree | da0b3b07191d689e66ac15478f91d6962346c93e | |
parent | 0291c722fb298768d1942824ea2900399566e8a1 (diff) | |
download | dmenu-86019c58555b5d9514cfe2eba14248588a812f16.tar.gz dmenu-86019c58555b5d9514cfe2eba14248588a812f16.tar.bz2 dmenu-86019c58555b5d9514cfe2eba14248588a812f16.zip |
fixed xinerama corner case
-rw-r--r-- | dmenu.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -506,18 +506,18 @@ setup(void) { mh = (lines + 1) * bh; #ifdef XINERAMA if((info = XineramaQueryScreens(dc->dpy, &n))) { - int i, m, di; + int i, di; unsigned int du; Window dw; XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du); - for(i = 0, m = -1; i < n; i++) + for(i = 0; i < n-1; i++) if((monitor == info[i].screen_number) - || (m < 0 && INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))) - m = i; - x = info[m].x_org; - y = info[m].y_org + (topbar ? 0 : info[m].height - mh); - mw = info[m].width; + || (monitor < 0 && INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))) + break; + x = info[i].x_org; + y = info[i].y_org + (topbar ? 0 : info[i].height - mh); + mw = info[i].width; XFree(info); } else |