From 37e0cf8346f7ce87a5a637bd0e6f9b7176051e97 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 10 Jul 2011 20:15:22 +0200 Subject: [PATCH] x: copy the pre-rendered pixmap contents to a decoration window immediately after mapping Reduces flickering. --- src/x.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.39.5