(con->window == NULL || !con->window->name_x_changed) &&
!con->parent->pixmap_recreated &&
memcmp(p, con->deco_render_params, sizeof(struct deco_render_params)) == 0) {
- DLOG("CACHE HIT, copying existing pixmaps\n");
+ DLOG("CACHE HIT, not re-rendering\n");
free(p);
- goto copy_pixmaps;
+ return;
}
DLOG("CACHE MISS\n");
* decoration. */
if (p->border_style != BS_NORMAL) {
DLOG("border style not BS_NORMAL, aborting rendering of decoration\n");
- goto copy_pixmaps;
+ goto update_pixmaps;
}
/* 4: paint the bar */
"another container"
);
- goto copy_pixmaps;
+ goto update_pixmaps;
}
int indent_level = 0,
win->name_x
);
-copy_pixmaps:
- xcb_copy_area(conn, con->pixmap, con->frame, con->pm_gc, 0, 0, 0, 0, con->rect.width, con->rect.height);
- xcb_copy_area(conn, parent->pixmap, parent->frame, parent->pm_gc, 0, 0, 0, 0, parent->rect.width, parent->rect.height);
+update_pixmaps:
+ xcb_clear_area(conn, false, con->frame, 0, 0, con->rect.width, con->rect.height);
+ xcb_clear_area(conn, false, parent->frame, 0, 0, parent->rect.width, parent->rect.height);
}
/*
}
xcb_create_pixmap(conn, root_depth, con->pixmap, con->frame, rect.width, rect.height);
xcb_create_gc(conn, con->pm_gc, con->pixmap, 0, 0);
+ uint32_t values[] = { con->pixmap };
+ xcb_change_window_attributes(conn, con->frame, XCB_CW_BACK_PIXMAP, values);
con->pixmap_recreated = true;
}
memcpy(&(state->rect), &rect, sizeof(Rect));