x: copy the pre-rendered pixmap contents to a decoration window immediately after mapping

Reduces flickering.
This commit is contained in:
Michael Stapelberg 2011-07-10 20:15:22 +02:00
parent afef42a4ac
commit 37e0cf8346
1 changed files with 4 additions and 0 deletions

View File

@ -641,6 +641,10 @@ void x_push_node(Con *con) {
values[0] = FRAME_EVENT_MASK; values[0] = FRAME_EVENT_MASK;
xcb_change_window_attributes(conn, con->frame, XCB_CW_EVENT_MASK, values); xcb_change_window_attributes(conn, con->frame, XCB_CW_EVENT_MASK, values);
/* copy the pixmap contents to the frame window immediately after mapping */
xcb_copy_area(conn, con->pixmap, con->frame, con->pm_gc, 0, 0, 0, 0, con->rect.width, con->rect.height);
xcb_flush(conn);
DLOG("mapping container %08x (serial %d)\n", con->frame, cookie.sequence); DLOG("mapping container %08x (serial %d)\n", con->frame, cookie.sequence);
state->mapped = con->mapped; state->mapped = con->mapped;
} }