]> git.sur5r.net Git - i3/i3/commitdiff
x: copy the pre-rendered pixmap contents to a decoration window immediately after...
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 10 Jul 2011 18:15:22 +0000 (20:15 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 10 Jul 2011 18:15:22 +0000 (20:15 +0200)
Reduces flickering.

src/x.c

diff --git a/src/x.c b/src/x.c
index 492442a76a251c05d9c29417b0837e834ba66f73..759a0be14dcc847c281465574c26ab318a1d6f28 100644 (file)
--- 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;
     }