1
0
Fork 0

fixed xinerama corner case

This commit is contained in:
Connor Lane Smith 2011-05-12 13:17:41 +01:00
parent 0291c722fb
commit 86019c5855

14
dmenu.c
View file

@ -506,18 +506,18 @@ setup(void) {
mh = (lines + 1) * bh; mh = (lines + 1) * bh;
#ifdef XINERAMA #ifdef XINERAMA
if((info = XineramaQueryScreens(dc->dpy, &n))) { if((info = XineramaQueryScreens(dc->dpy, &n))) {
int i, m, di; int i, di;
unsigned int du; unsigned int du;
Window dw; Window dw;
XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du); 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) 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))) || (monitor < 0 && INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height)))
m = i; break;
x = info[m].x_org; x = info[i].x_org;
y = info[m].y_org + (topbar ? 0 : info[m].height - mh); y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
mw = info[m].width; mw = info[i].width;
XFree(info); XFree(info);
} }
else else