Xinqi Bao's Git
projects
/
dmenu.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
d77340e
)
new libdraw
author
Connor Lane Smith <
[email protected]
>
Fri, 30 Jul 2010 09:25:55 +0000
(10:25 +0100)
committer
Connor Lane Smith <
[email protected]
>
Fri, 30 Jul 2010 09:25:55 +0000
(10:25 +0100)
dinput.c
diff
|
blob
|
history
dmenu.c
diff
|
blob
|
history
diff --git
a/dinput.c
b/dinput.c
index
e861afc
..
4bbc7bc
100644
(file)
--- a/
dinput.c
+++ b/
dinput.c
@@
-34,12
+34,14
@@
drawbar(void)
/* print prompt? */
if(prompt) {
dc.w = promptw;
/* print prompt? */
if(prompt) {
dc.w = promptw;
+ drawbox(&dc, selcol);
drawtext(&dc, prompt, selcol);
dc.x += dc.w;
}
dc.w = mw - dc.x;
drawtext(&dc, text, normcol);
drawtext(&dc, prompt, selcol);
dc.x += dc.w;
}
dc.w = mw - dc.x;
drawtext(&dc, text, normcol);
- drawcursor(&dc, text, cursor, normcol);
+ drawline(&dc, textnw(&dc, text, cursor) + dc.font.height/2, 2, 1,
+ dc.font.height-2, normcol);
commitdraw(&dc, win);
}
commitdraw(&dc, win);
}
diff --git
a/dmenu.c
b/dmenu.c
index
2c1867c
..
076cffe
100644
(file)
--- a/
dmenu.c
+++ b/
dmenu.c
@@
-24,7
+24,7
@@
static void calcoffsetsv(void);
static char *cistrstr(const char *s, const char *sub);
static void cleanup(void);
static void dinput(void);
static char *cistrstr(const char *s, const char *sub);
static void cleanup(void);
static void dinput(void);
-static void drawitem(char *s, unsigned long col[ColLast]);
+static void drawitem(c
onst c
har *s, unsigned long col[ColLast]);
static void drawmenuh(void);
static void drawmenuv(void);
static void match(void);
static void drawmenuh(void);
static void drawmenuv(void);
static void match(void);
@@
-140,6
+140,7
@@
drawbar(void) {
/* print prompt? */
if(prompt) {
dc.w = promptw;
/* print prompt? */
if(prompt) {
dc.w = promptw;
+ drawbox(&dc, selcol);
drawtext(&dc, prompt, selcol);
dc.x += dc.w;
}
drawtext(&dc, prompt, selcol);
dc.x += dc.w;
}
@@
-156,7
+157,7
@@
drawbar(void) {
}
void
}
void
-drawitem(char *s, unsigned long col[ColLast]) {
+drawitem(c
onst c
har *s, unsigned long col[ColLast]) {
drawbox(&dc, col);
drawtext(&dc, s, col);
}
drawbox(&dc, col);
drawtext(&dc, s, col);
}