From 7d9ba707b31be69ca07c931d0920928d25b895ab Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 10 Jul 2011 21:54:34 +0200 Subject: [PATCH] =?utf8?q?x:=20Don=E2=80=99t=20pre-render=20the=20decorati?= =?utf8?q?on=20for=20windows=20inside=20a=20stack=20which=20are=20not=20vi?= =?utf8?q?sible?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Saves n-1 decoration renderings for n windows in a stack whenever a new window gets added or removed. --- src/x.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/x.c b/src/x.c index b40a5c38..85e9f41a 100644 --- a/src/x.c +++ b/src/x.c @@ -578,10 +578,15 @@ void x_push_node(Con *con) { con->pixmap_recreated = true; - /* Render the decoration now to make the correct decoration visible - * from the very first moment. Later calls will be cached, so this - * doesn’t hurt performance. */ - x_deco_recurse(con); + /* Don’t render the decoration for windows inside a stack which are + * not visible right now */ + if (!con->parent || + con->parent->layout != L_STACKED || + TAILQ_FIRST(&(con->parent->focus_head)) == con) + /* Render the decoration now to make the correct decoration visible + * from the very first moment. Later calls will be cached, so this + * doesn’t hurt performance. */ + x_deco_recurse(con); } DLOG("setting rect (%d, %d, %d, %d)\n", rect.x, rect.y, rect.width, rect.height); -- 2.39.5