Merge pull request #4025 from xzfc/always-clear-parent-pixmap

x_draw_decoration: always clear parent pixmap when rendering the first child
This commit is contained in:
Ingo Bürk 2020-05-01 09:46:07 +02:00 committed by GitHub
commit b61a28f156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

10
src/x.c
View File

@ -592,11 +592,6 @@ void x_draw_decoration(Con *con) {
} }
} }
/* if this is a borderless/1pixel window, we dont need to render the
* decoration. */
if (p->border_style != BS_NORMAL)
goto copy_pixmaps;
/* If the parent hasn't been set up yet, skip the decoration rendering /* If the parent hasn't been set up yet, skip the decoration rendering
* for now. */ * for now. */
if (parent->frame_buffer.id == XCB_NONE) if (parent->frame_buffer.id == XCB_NONE)
@ -610,6 +605,11 @@ void x_draw_decoration(Con *con) {
FREE(con->parent->deco_render_params); FREE(con->parent->deco_render_params);
} }
/* if this is a borderless/1pixel window, we dont need to render the
* decoration. */
if (p->border_style != BS_NORMAL)
goto copy_pixmaps;
/* 4: paint the bar */ /* 4: paint the bar */
draw_util_rectangle(&(parent->frame_buffer), p->color->background, draw_util_rectangle(&(parent->frame_buffer), p->color->background,
con->deco_rect.x, con->deco_rect.y, con->deco_rect.width, con->deco_rect.height); con->deco_rect.x, con->deco_rect.y, con->deco_rect.width, con->deco_rect.height);