Bugfix: Don’t fill split cons etc. with client background color (fixes nested decoration rendering)
Fixes: #359
This commit is contained in:
parent
4da6fc7ba3
commit
4be3178d4d
40
src/x.c
40
src/x.c
|
@ -303,28 +303,30 @@ void x_draw_decoration(Con *con) {
|
||||||
deco_rect.height = 0;
|
deco_rect.height = 0;
|
||||||
|
|
||||||
/* 2: draw the client.background, but only for the parts around the client_rect */
|
/* 2: draw the client.background, but only for the parts around the client_rect */
|
||||||
xcb_rectangle_t background[] = {
|
if (con->window != NULL) {
|
||||||
/* top area */
|
xcb_rectangle_t background[] = {
|
||||||
{ 0, 0, r->width, w->y },
|
/* top area */
|
||||||
/* bottom area */
|
{ 0, 0, r->width, w->y },
|
||||||
{ 0, (w->y + w->height), r->width, r->height - (w->y + w->height) },
|
/* bottom area */
|
||||||
/* left area */
|
{ 0, (w->y + w->height), r->width, r->height - (w->y + w->height) },
|
||||||
{ 0, 0, w->x, r->height },
|
/* left area */
|
||||||
/* right area */
|
{ 0, 0, w->x, r->height },
|
||||||
{ w->x + w->width, 0, r->width - (w->x + w->width), r->height }
|
/* right area */
|
||||||
};
|
{ w->x + w->width, 0, r->width - (w->x + w->width), r->height }
|
||||||
|
};
|
||||||
#if 0
|
#if 0
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
DLOG("rect is (%d, %d) with %d x %d\n",
|
DLOG("rect is (%d, %d) with %d x %d\n",
|
||||||
background[i].x,
|
background[i].x,
|
||||||
background[i].y,
|
background[i].y,
|
||||||
background[i].width,
|
background[i].width,
|
||||||
background[i].height
|
background[i].height
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
xcb_change_gc_single(conn, con->pm_gc, XCB_GC_FOREGROUND, config.client.background);
|
xcb_change_gc_single(conn, con->pm_gc, XCB_GC_FOREGROUND, config.client.background);
|
||||||
xcb_poly_fill_rectangle(conn, con->pixmap, con->pm_gc, sizeof(background) / sizeof(xcb_rectangle_t), background);
|
xcb_poly_fill_rectangle(conn, con->pixmap, con->pm_gc, sizeof(background) / sizeof(xcb_rectangle_t), background);
|
||||||
|
}
|
||||||
|
|
||||||
/* 3: draw a rectangle in border color around the client */
|
/* 3: draw a rectangle in border color around the client */
|
||||||
if (p->border_style != BS_NONE && p->con_is_leaf) {
|
if (p->border_style != BS_NONE && p->con_is_leaf) {
|
||||||
|
|
Loading…
Reference in New Issue