introduce client.placeholder color

This commit is contained in:
Michael Stapelberg
2013-12-15 11:42:40 +01:00
parent 639a1b182c
commit 35b70ca423
4 changed files with 12 additions and 5 deletions

View File

@ -100,8 +100,8 @@ void restore_connect(void) {
}
static void update_placeholder_contents(placeholder_state *state) {
// TODO: introduce color configuration for placeholder windows.
xcb_change_gc(restore_conn, state->gc, XCB_GC_FOREGROUND, (uint32_t[]) { config.client.background });
xcb_change_gc(restore_conn, state->gc, XCB_GC_FOREGROUND,
(uint32_t[]) { config.client.placeholder.background });
xcb_poly_fill_rectangle(restore_conn, state->pixmap, state->gc, 1,
(xcb_rectangle_t[]) { { 0, 0, state->rect.width, state->rect.height } });
@ -109,7 +109,7 @@ static void update_placeholder_contents(placeholder_state *state) {
xcb_flush(restore_conn);
xcb_aux_sync(restore_conn);
set_font_colors(state->gc, config.client.focused.background, 0);
set_font_colors(state->gc, config.client.placeholder.text, config.client.placeholder.background);
Match *swallows;
int n = 0;
@ -168,8 +168,7 @@ static void open_placeholder_window(Con *con) {
true,
XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK,
(uint32_t[]){
// TODO: use the background color as background pixel to avoid flickering
root_screen->white_pixel,
config.client.placeholder.background,
XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY,
});
/* Set the same name as was stored in the layout file. While perhaps