modified: bin/color
modified: src/color.c
This commit is contained in:
parent
6b16f4a8ad
commit
40ac18e27b
@ -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;
|
display_summary->foreground.blue = 0xffff - display_summary->background.blue;
|
||||||
XAllocColor(display_summary->display, display_summary->colormap, &display_summary->foreground);
|
XAllocColor(display_summary->display, display_summary->colormap, &display_summary->foreground);
|
||||||
XClearWindow(display_summary->display, display_summary->window);
|
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);
|
XSetWindowBackground(display_summary->display, display_summary->window, display_summary->background.pixel);
|
||||||
XSetForeground(display_summary->display, *gc, display_summary->foreground.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);
|
XDrawText(display_summary->display, display_summary->window, *gc, TEXT_CORNER_OFFSET, textpos_y, text_prompt, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -166,8 +166,10 @@ int main(void) {
|
|||||||
break;
|
break;
|
||||||
case X_ENTER_KEY:
|
case X_ENTER_KEY:
|
||||||
text_prompt_buffer[text_prompt.nchars + 1] = '\0';
|
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);
|
XParseColor(display, colormap, text_prompt_buffer, &background_color);
|
||||||
|
background_color.red = 60000;
|
||||||
|
XAllocColor(display, colormap, &background_color);
|
||||||
is_prompt = 0;
|
is_prompt = 0;
|
||||||
text_prompt.nchars = 0;
|
text_prompt.nchars = 0;
|
||||||
redraw_display(&display_summary, &text_prompt, &text_prompt_gc, textpos_y);
|
redraw_display(&display_summary, &text_prompt, &text_prompt_gc, textpos_y);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user