aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-07-16 19:11:32 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-07-16 19:11:32 +0000
commitf20bf2dd0b3a48191cec442df982185280b764b9 (patch)
tree0a61680038624a5ec96d2479191efa32b336f7be /main.c
parent156afa81bd0e68d856cb29802426f5cfa7e6e616 (diff)
downloaddzen-f20bf2dd0b3a48191cec442df982185280b764b9.tar.gz
dzen-f20bf2dd0b3a48191cec442df982185280b764b9.zip
added support to color arbitrary parts of text
code needs testing git-svn-id: http://dzen.googlecode.com/svn/trunk@124 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.c b/main.c
index 9e4b1c6..765d728 100644
--- a/main.c
+++ b/main.c
@@ -45,6 +45,7 @@ clean_up(void) {
XDestroyWindow(dzen.dpy, dzen.slave_win.win);
}
XFreeGC(dzen.dpy, dzen.gc);
+ XFreeGC(dzen.dpy, dzen.rgc);
XDestroyWindow(dzen.dpy, dzen.title_win.win);
XCloseDisplay(dzen.dpy);
}
@@ -170,14 +171,14 @@ read_stdin(void) {
static void
x_hilight_line(int line) {
drawtext(dzen.slave_win.tbuf[line + dzen.slave_win.first_line_vis].text, 1, line, dzen.slave_win.alignment);
- XCopyArea(dzen.dpy, dzen.slave_win.drawable[line], dzen.slave_win.line[line], dzen.rgc,
+ XCopyArea(dzen.dpy, dzen.slave_win.drawable[line], dzen.slave_win.line[line], dzen.gc,
0, 0, dzen.slave_win.width, dzen.line_height, 0, 0);
}
static void
x_unhilight_line(int line) {
drawtext(dzen.slave_win.tbuf[line + dzen.slave_win.first_line_vis].text, 0, line, dzen.slave_win.alignment);
- XCopyArea(dzen.dpy, dzen.slave_win.drawable[line], dzen.slave_win.line[line], dzen.gc,
+ XCopyArea(dzen.dpy, dzen.slave_win.drawable[line], dzen.slave_win.line[line], dzen.rgc,
0, 0, dzen.slave_win.width, dzen.line_height, 0, 0);
}
@@ -428,7 +429,7 @@ x_create_windows(void) {
dzen.gc = XCreateGC(dzen.dpy, root, 0, 0);
XSetForeground(dzen.dpy, dzen.gc, dzen.norm[ColFG]);
XSetBackground(dzen.dpy, dzen.gc, dzen.norm[ColBG]);
- /* reverse GC */
+ /* temporary GC */
dzen.rgc = XCreateGC(dzen.dpy, root, 0, 0);
XSetForeground(dzen.dpy, dzen.rgc, dzen.norm[ColBG]);
XSetBackground(dzen.dpy, dzen.rgc, dzen.norm[ColFG]);