Bugfix: rendering cache also needs to consider con->pixmap_recreated for borders

This commit is contained in:
Michael Stapelberg 2011-05-29 13:03:36 +02:00
parent 18ec15b0f9
commit 1fc15d270e
1 changed files with 7 additions and 5 deletions

12
src/x.c
View File

@ -235,7 +235,7 @@ void x_window_kill(xcb_window_t window, kill_window_t kill_window) {
* *
*/ */
void x_draw_decoration(Con *con) { void x_draw_decoration(Con *con) {
const Con *parent = con->parent; Con *parent = con->parent;
/* This code needs to run for: /* This code needs to run for:
* leaf containers * leaf containers
* non-leaf containers which are in a stacked/tabbed container * non-leaf containers which are in a stacked/tabbed container
@ -282,7 +282,8 @@ void x_draw_decoration(Con *con) {
if (con->deco_render_params != NULL && if (con->deco_render_params != NULL &&
(con->window == NULL || !con->window->name_x_changed) && (con->window == NULL || !con->window->name_x_changed) &&
!con->parent->pixmap_recreated && !parent->pixmap_recreated &&
!con->pixmap_recreated &&
memcmp(p, con->deco_render_params, sizeof(struct deco_render_params)) == 0) { memcmp(p, con->deco_render_params, sizeof(struct deco_render_params)) == 0) {
DLOG("CACHE HIT, not re-rendering\n"); DLOG("CACHE HIT, not re-rendering\n");
free(p); free(p);
@ -302,11 +303,12 @@ void x_draw_decoration(Con *con) {
if (con->window != NULL && con->window->name_x_changed) if (con->window != NULL && con->window->name_x_changed)
con->window->name_x_changed = false; con->window->name_x_changed = false;
con->parent->pixmap_recreated = false; parent->pixmap_recreated = false;
con->pixmap_recreated = false;
/* If the con is in fullscreen mode, the decoration height we work with is set to 0 */ /* If the con is in fullscreen mode, the decoration height we work with is set to 0 */
Rect deco_rect = con->deco_rect; Rect deco_rect = con->deco_rect;
if (con_get_fullscreen_con(con->parent) == con) if (con_get_fullscreen_con(parent) == 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 */
@ -411,7 +413,7 @@ void x_draw_decoration(Con *con) {
int indent_level = 0, int indent_level = 0,
indent_mult = 0; indent_mult = 0;
Con *il_parent = con->parent; Con *il_parent = parent;
if (il_parent->layout != L_STACKED) { if (il_parent->layout != L_STACKED) {
while (1) { while (1) {
DLOG("il_parent = %p, layout = %d\n", il_parent, il_parent->layout); DLOG("il_parent = %p, layout = %d\n", il_parent, il_parent->layout);