aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2011-05-11 12:25:50 +0100
committerConnor Lane Smith <cls@lubutu.com>2011-05-11 12:25:50 +0100
commit0291c722fb298768d1942824ea2900399566e8a1 (patch)
tree77faef3f8778bf243316bd197b3062433cd3bd7d
parente0e6b071c63f960c398b43b2fbf0dec66a9b3ab6 (diff)
fixed -m bug (thanks Rob)
-rw-r--r--dmenu.c18
-rw-r--r--draw.c6
2 files changed, 12 insertions, 12 deletions
diff --git a/dmenu.c b/dmenu.c
index 2193f82..3c83d73 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -76,10 +76,10 @@ main(int argc, char *argv[]) {
76 } 76 }
77 else if(!strcmp(argv[i], "-b")) 77 else if(!strcmp(argv[i], "-b"))
78 topbar = False; 78 topbar = False;
79 else if(!strcmp(argv[i], "-i"))
80 fstrncmp = strncasecmp;
81 else if(!strcmp(argv[i], "-f")) 79 else if(!strcmp(argv[i], "-f"))
82 fast = True; 80 fast = True;
81 else if(!strcmp(argv[i], "-i"))
82 fstrncmp = strncasecmp;
83 else if(i == argc-1) 83 else if(i == argc-1)
84 goto usage; 84 goto usage;
85 /* double flags */ 85 /* double flags */
@@ -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, di; 509 int i, m, 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; i < n; i++) 514 for(i = 0, m = -1; i < n; i++)
515 if((monitor == info[i].screen_number) 515 if((monitor == info[i].screen_number)
516 || (monitor < 0 && INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))) 516 || (m < 0 && INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height)))
517 break; 517 m = i;
518 x = info[i].x_org; 518 x = info[m].x_org;
519 y = info[i].y_org + (topbar ? 0 : info[i].height - mh); 519 y = info[m].y_org + (topbar ? 0 : info[m].height - mh);
520 mw = info[i].width; 520 mw = info[m].width;
521 XFree(info); 521 XFree(info);
522 } 522 }
523 else 523 else
diff --git a/draw.c b/draw.c
index 83ced4b..d35d4c2 100644
--- a/draw.c
+++ b/draw.c
@@ -7,9 +7,9 @@
7#include <X11/Xlib.h> 7#include <X11/Xlib.h>
8#include "draw.h" 8#include "draw.h"
9 9
10#define MAX(a, b) ((a) > (b) ? (a) : (b)) 10#define MAX(a, b) ((a) > (b) ? (a) : (b))
11#define MIN(a, b) ((a) < (b) ? (a) : (b)) 11#define MIN(a, b) ((a) < (b) ? (a) : (b))
12#define DEFFONT "fixed" 12#define DEFFONT "fixed"
13 13
14static Bool loadfont(DC *dc, const char *fontstr); 14static Bool loadfont(DC *dc, const char *fontstr);
15 15