Xinqi Bao's Git
projects
/
dmenu.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
new libdraw
[dmenu.git]
/
dmenu.c
diff --git
a/dmenu.c
b/dmenu.c
index
a5a4cdd
..
f6e6931
100644
(file)
--- a/
dmenu.c
+++ b/
dmenu.c
@@
-41,8
+41,8
@@
static void usage(void);
static char text[BUFSIZ];
static int bh, mw, mh;
static int inputw = 0;
static char text[BUFSIZ];
static int bh, mw, mh;
static int inputw = 0;
-static int promptw;
static int lines = 0;
static int lines = 0;
+static int promptw;
static size_t cursor = 0;
static const char *font = NULL;
static const char *prompt = NULL;
static size_t cursor = 0;
static const char *font = NULL;
static const char *prompt = NULL;
@@
-132,7
+132,7
@@
drawmenu(void) {
if(next)
drawtext(dc, ">", normcol);
}
if(next)
drawtext(dc, ">", normcol);
}
-
commit
draw(dc, win, mw, mh);
+
map
draw(dc, win, mw, mh);
}
char *
}
char *
@@
-478,7
+478,7
@@
setup(void) {
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
grabkeyboard();
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
grabkeyboard();
-
setcanvas
(dc, mw, mh);
+
resizedraw
(dc, mw, mh);
inputw = MIN(inputw, mw/3);
promptw = prompt ? MIN(textw(dc, prompt), mw/5) : 0;
XMapRaised(dc->dpy, win);
inputw = MIN(inputw, mw/3);
promptw = prompt ? MIN(textw(dc, prompt), mw/5) : 0;
XMapRaised(dc->dpy, win);