diff options
-rw-r--r-- | dmenu.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -506,18 +506,18 @@ setup(void) { | |||
506 | mh = (lines + 1) * bh; | 506 | mh = (lines + 1) * bh; |
507 | #ifdef XINERAMA | 507 | #ifdef XINERAMA |
508 | if((info = XineramaQueryScreens(dc->dpy, &n))) { | 508 | if((info = XineramaQueryScreens(dc->dpy, &n))) { |
509 | int i, m, di; | 509 | int i, di; |
510 | unsigned int du; | 510 | unsigned int du; |
511 | Window dw; | 511 | Window dw; |
512 | 512 | ||
513 | XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du); | 513 | XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du); |
514 | for(i = 0, m = -1; i < n; i++) | 514 | for(i = 0; i < n-1; i++) |
515 | if((monitor == info[i].screen_number) | 515 | if((monitor == info[i].screen_number) |
516 | || (m < 0 && INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))) | 516 | || (monitor < 0 && INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))) |
517 | m = i; | 517 | break; |
518 | x = info[m].x_org; | 518 | x = info[i].x_org; |
519 | y = info[m].y_org + (topbar ? 0 : info[m].height - mh); | 519 | y = info[i].y_org + (topbar ? 0 : info[i].height - mh); |
520 | mw = info[m].width; | 520 | mw = info[i].width; |
521 | XFree(info); | 521 | XFree(info); |
522 | } | 522 | } |
523 | else | 523 | else |