]> git.sur5r.net Git - i3/i3/commitdiff
floating_reposition: avoid extra tree_render
authorOrestis Floros <orestisf1993@gmail.com>
Fri, 5 Oct 2018 11:29:29 +0000 (14:29 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Sat, 13 Oct 2018 18:10:11 +0000 (21:10 +0300)
src/floating.c

index 96d7246c15950119f2e97f0d8ff51362bb36ab1f..a99d0970f356156abbd29e96a4167e7185ece558 100644 (file)
@@ -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;
 }