Revert "x: Set pixmap as background window, saves a lot of CopyAreas"

This reverts commit 84b804cda6.
Turns out that it triggered graphic corruptions on ATI graphics cards (Thanks
aniou) with certain drivers.
This commit is contained in:
Michael Stapelberg 2011-07-10 16:22:09 +02:00
parent d0a3e673b8
commit 64cfb2dbb1

17
src/x.c
View File

@ -286,9 +286,9 @@ void x_draw_decoration(Con *con) {
!parent->pixmap_recreated && !parent->pixmap_recreated &&
!con->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, copying existing pixmaps\n");
free(p); free(p);
return; goto copy_pixmaps;
} }
DLOG("CACHE MISS\n"); DLOG("CACHE MISS\n");
@ -369,7 +369,7 @@ void x_draw_decoration(Con *con) {
* decoration. */ * decoration. */
if (p->border_style != BS_NORMAL) { if (p->border_style != BS_NORMAL) {
DLOG("border style not BS_NORMAL, aborting rendering of decoration\n"); DLOG("border style not BS_NORMAL, aborting rendering of decoration\n");
goto update_pixmaps; goto copy_pixmaps;
} }
/* 4: paint the bar */ /* 4: paint the bar */
@ -409,7 +409,7 @@ void x_draw_decoration(Con *con) {
"another container" "another container"
); );
goto update_pixmaps; goto copy_pixmaps;
} }
int indent_level = 0, int indent_level = 0,
@ -450,9 +450,9 @@ void x_draw_decoration(Con *con) {
win->name_x win->name_x
); );
update_pixmaps: copy_pixmaps:
xcb_clear_area(conn, false, con->frame, 0, 0, con->rect.width, con->rect.height); xcb_copy_area(conn, con->pixmap, con->frame, con->pm_gc, 0, 0, 0, 0, con->rect.width, con->rect.height);
xcb_clear_area(conn, false, parent->frame, 0, 0, parent->rect.width, parent->rect.height); xcb_copy_area(conn, parent->pixmap, parent->frame, parent->pm_gc, 0, 0, 0, 0, parent->rect.width, parent->rect.height);
} }
/* /*
@ -575,9 +575,6 @@ void x_push_node(Con *con) {
* from the very first moment. Later calls will be cached, so this * from the very first moment. Later calls will be cached, so this
* doesnt hurt performance. */ * doesnt hurt performance. */
x_deco_recurse(con); x_deco_recurse(con);
uint32_t values[] = { con->pixmap };
xcb_change_window_attributes(conn, con->frame, XCB_CW_BACK_PIXMAP, values);
} }
DLOG("setting rect (%d, %d, %d, %d)\n", rect.x, rect.y, rect.width, rect.height); DLOG("setting rect (%d, %d, %d, %d)\n", rect.x, rect.y, rect.width, rect.height);