diff options
author | Brett Weiland <techcrazybsw@gmail.com> | 2020-07-27 00:49:25 -0500 |
---|---|---|
committer | Brett Weiland <techcrazybsw@gmail.com> | 2020-07-27 00:49:25 -0500 |
commit | 40ac18e27b2d1f96286b5d9a68761d226749c08f (patch) | |
tree | 319777c7ba7ac48fe302b70822b176cc6fe3419d | |
parent | 6b16f4a8ad234e909a672b8b1f1232259ba6d558 (diff) |
modified: bin/color
modified: src/color.c
-rwxr-xr-x | bin/color | bin | 17704 -> 17704 bytes | |||
-rw-r--r-- | src/color.c | 6 |
2 files changed, 4 insertions, 2 deletions
Binary files differ diff --git a/src/color.c b/src/color.c index cfe6077..ad21919 100644 --- a/src/color.c +++ b/src/color.c @@ -47,9 +47,9 @@ int redraw_display(update_info *display_summary, XTextItem *text_prompt, GC *gc, display_summary->foreground.blue = 0xffff - display_summary->background.blue; XAllocColor(display_summary->display, display_summary->colormap, &display_summary->foreground); XClearWindow(display_summary->display, display_summary->window); + printf("%i\n", display_summary->background.pixel); XSetWindowBackground(display_summary->display, display_summary->window, display_summary->background.pixel); XSetForeground(display_summary->display, *gc, display_summary->foreground.pixel); - printf("%i\n", display_summary->foreground.red); XDrawText(display_summary->display, display_summary->window, *gc, TEXT_CORNER_OFFSET, textpos_y, text_prompt, 1); } @@ -166,8 +166,10 @@ int main(void) { break; case X_ENTER_KEY: text_prompt_buffer[text_prompt.nchars + 1] = '\0'; - printf("%i: %s\n", strlen(text_prompt_buffer), text_prompt_buffer); + XFreeColors(display, colormap, background_color.pixel, 1, NULL); XParseColor(display, colormap, text_prompt_buffer, &background_color); + background_color.red = 60000; + XAllocColor(display, colormap, &background_color); is_prompt = 0; text_prompt.nchars = 0; redraw_display(&display_summary, &text_prompt, &text_prompt_gc, textpos_y); |