From: Michael Stapelberg Date: Sun, 10 Jul 2011 18:15:22 +0000 (+0200) Subject: x: copy the pre-rendered pixmap contents to a decoration window immediately after... X-Git-Tag: tree-pr4~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=37e0cf8346f7ce87a5a637bd0e6f9b7176051e97;p=i3%2Fi3 x: copy the pre-rendered pixmap contents to a decoration window immediately after mapping Reduces flickering. --- diff --git a/src/x.c b/src/x.c index 492442a7..759a0be1 100644 --- a/src/x.c +++ b/src/x.c @@ -641,6 +641,10 @@ void x_push_node(Con *con) { values[0] = FRAME_EVENT_MASK; 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); state->mapped = con->mapped; }