x_draw_decoration: always clear parent pixmap when rendering the first child
Previously, i3 used to clean the parent pixmap only if the first child has a titlebar. This worked well for case `V[a b]` when both `a` and `b` have titlebars (clearing is required), or both haven't (clearing is not required). However, in case if `a` has no titlebar, but `b` has, this could lead to graphical glitches. This commit rearranges the order of conditions to make sure that the parent pixmap is cleared regardless of the border style of the first child.
This commit is contained in:
parent
0bce0d86bf
commit
7419400a8d
10
src/x.c
10
src/x.c
|
@ -590,11 +590,6 @@ void x_draw_decoration(Con *con) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if this is a borderless/1pixel window, we don’t 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)
|
||||||
|
@ -608,6 +603,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 don’t 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);
|
||||||
|
|
Loading…
Reference in New Issue