From 204eefc67975f0ed1afb3b513f8fc4eb2020d2f6 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Fri, 5 Oct 2018 14:29:29 +0300 Subject: [PATCH] floating_reposition: avoid extra tree_render --- src/floating.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/floating.c b/src/floating.c index 96d7246c..a99d0970 100644 --- a/src/floating.c +++ b/src/floating.c @@ -899,13 +899,17 @@ bool floating_reposition(Con *con, Rect newrect) { con->rect = newrect; - floating_maybe_reassign_ws(con); + bool reassigned = floating_maybe_reassign_ws(con); /* If this is a scratchpad window, don't auto center it from now on. */ if (con->scratchpad_state == SCRATCHPAD_FRESH) con->scratchpad_state = SCRATCHPAD_CHANGED; - tree_render(); + /* Workspace change will already result in a tree_render. */ + if (!reassigned) { + render_con(con, false); + x_push_node(con); + } return true; } -- 2.39.5