X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fx.c;h=bef0e22ac14a4a1b1fce598d42becabcc274007d;hb=034a12acad203750583cf95da9e7e97fe6610797;hp=51b66c5dd207110c402e95a0dc31df6596f42872;hpb=019ae6d06cc7a8df5b34f60c2685955ba3bc3c48;p=i3%2Fi3 diff --git a/src/x.c b/src/x.c index 51b66c5d..bef0e22a 100644 --- a/src/x.c +++ b/src/x.c @@ -299,7 +299,7 @@ void x_window_kill(xcb_window_t window, kill_window_t kill_window) { free(event); } -static void x_draw_decoration_border(Con *con, struct deco_render_params *p) { +static void x_draw_title_border(Con *con, struct deco_render_params *p) { assert(con->parent != NULL); Rect *dr = &(con->deco_rect); @@ -344,7 +344,7 @@ static void x_draw_decoration_after_title(Con *con, struct deco_render_params *p } /* Redraw the border. */ - x_draw_decoration_border(con, p); + x_draw_title_border(con, p); } /* @@ -464,21 +464,24 @@ void x_draw_decoration(Con *con) { * rectangle because some childs are not freely resizable and we want * their background color to "shine through". */ if (!(borders_to_hide & ADJ_LEFT_SCREEN_EDGE)) { - draw_util_rectangle(conn, &(con->frame_buffer), p->color->background, - 0, 0, br.x, r->height); + draw_util_rectangle(conn, &(con->frame_buffer), p->color->decoration_border, 0, 0, br.x, r->height); } if (!(borders_to_hide & ADJ_RIGHT_SCREEN_EDGE)) { - draw_util_rectangle(conn, &(con->frame_buffer), p->color->background, - r->width + (br.width + br.x), 0, -(br.width + br.x), r->height); + draw_util_rectangle(conn, &(con->frame_buffer), + p->color->decoration_border, r->width + (br.width + br.x), 0, + -(br.width + br.x), r->height); } if (!(borders_to_hide & ADJ_LOWER_SCREEN_EDGE)) { - draw_util_rectangle(conn, &(con->frame_buffer), p->color->background, - br.x, r->height + (br.height + br.y), r->width + br.width, -(br.height + br.y)); + draw_util_rectangle(conn, &(con->frame_buffer), + p->color->decoration_border, br.x, r->height + (br.height + + br.y), + r->width + br.width, -(br.height + br.y)); } /* pixel border needs an additional line at the top */ if (p->border_style == BS_PIXEL && !(borders_to_hide & ADJ_UPPER_SCREEN_EDGE)) { - draw_util_rectangle(conn, &(con->frame_buffer), p->color->background, - br.x, 0, r->width + br.width, br.y); + draw_util_rectangle(conn, &(con->frame_buffer), + p->color->decoration_border, br.x, 0, r->width + br.width, + br.y); } /* Highlight the side of the border at which the next window will be @@ -521,7 +524,7 @@ void x_draw_decoration(Con *con) { con->deco_rect.x, con->deco_rect.y, con->deco_rect.width, con->deco_rect.height); /* 5: draw two unconnected horizontal lines in border color */ - x_draw_decoration_border(con, p); + x_draw_title_border(con, p); /* 6: draw the title */ int text_offset_y = (con->deco_rect.height - config.font.height) / 2;