From: Orestis Floros Date: Fri, 5 Oct 2018 11:29:29 +0000 (+0300) Subject: floating_reposition: avoid extra tree_render X-Git-Tag: 4.16~14^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=204eefc67975f0ed1afb3b513f8fc4eb2020d2f6;p=i3%2Fi3 floating_reposition: avoid extra tree_render --- 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; }