From 85d851de5f90d7dc8a9bf61878f5a1467aa24a1f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 10 Jul 2011 22:27:31 +0200 Subject: [PATCH] x: disable GraphicsExposure events on our pixmap graphics contexts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Gets rid of GraphicsExposure and NoExpose events, which we don’t use anyways. --- src/x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/x.c b/src/x.c index 96c9d806..525d9bbd 100644 --- a/src/x.c +++ b/src/x.c @@ -574,7 +574,13 @@ void x_push_node(Con *con) { xcb_free_gc(conn, con->pm_gc); } xcb_create_pixmap(conn, root_depth, con->pixmap, con->frame, rect.width, rect.height); - xcb_create_gc(conn, con->pm_gc, con->pixmap, 0, 0); + /* For the graphics context, we disable GraphicsExposure events. + * Those will be sent when a CopyArea request cannot be fulfilled + * properly due to parts of the source being unmapped or otherwise + * unavailable. Since we always copy from pixmaps to windows, this + * is not a concern for us. */ + uint32_t values[] = { 0 }; + xcb_create_gc(conn, con->pm_gc, con->pixmap, XCB_GC_GRAPHICS_EXPOSURES, values); con->pixmap_recreated = true; -- 2.39.5