Browse Source

fixed -m bug (thanks Rob)

master
Connor Lane Smith 13 years ago
parent
commit
0291c722fb
2 changed files with 12 additions and 12 deletions
  1. +9
    -9
      dmenu.c
  2. +3
    -3
      draw.c

+ 9
- 9
dmenu.c View File

@ -76,10 +76,10 @@ main(int argc, char *argv[]) {
} }
else if(!strcmp(argv[i], "-b")) else if(!strcmp(argv[i], "-b"))
topbar = False; topbar = False;
else if(!strcmp(argv[i], "-i"))
fstrncmp = strncasecmp;
else if(!strcmp(argv[i], "-f")) else if(!strcmp(argv[i], "-f"))
fast = True; fast = True;
else if(!strcmp(argv[i], "-i"))
fstrncmp = strncasecmp;
else if(i == argc-1) else if(i == argc-1)
goto usage; goto usage;
/* double flags */ /* double flags */
@ -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, di;
int i, m, 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; i < n; i++)
for(i = 0, m = -1; i < n; i++)
if((monitor == info[i].screen_number) if((monitor == info[i].screen_number)
|| (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;
|| (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;
XFree(info); XFree(info);
} }
else else


+ 3
- 3
draw.c View File

@ -7,9 +7,9 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include "draw.h" #include "draw.h"
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define DEFFONT "fixed"
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define DEFFONT "fixed"
static Bool loadfont(DC *dc, const char *fontstr); static Bool loadfont(DC *dc, const char *fontstr);


Loading…
Cancel
Save