]> git.sur5r.net Git - i3/i3/commitdiff
Re-render floating cons alone when possible 3432/head
authorOrestis Floros <orestisf1993@gmail.com>
Mon, 1 Oct 2018 23:15:59 +0000 (02:15 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Mon, 12 Nov 2018 17:05:51 +0000 (19:05 +0200)
src/floating.c
src/handlers.c

index c8b436b40e3dd75a15396e32843a47a80e79ee0b..bfb130fbdf2b168ee9fb036e90eb75df06834429 100644 (file)
@@ -674,9 +674,7 @@ DRAGGING_CB(resize_window_callback) {
     con->rect.x = dest_x;
     con->rect.y = dest_y;
 
-    /* TODO: don’t re-render the whole tree just because we change
-     * coordinates of a floating window */
-    tree_render();
+    render_con(con);
     x_push_changes(croot);
 }
 
@@ -957,7 +955,7 @@ bool floating_reposition(Con *con, Rect newrect) {
 
     /* Workspace change will already result in a tree_render. */
     if (!reassigned) {
-        render_con(con, false);
+        render_con(con);
         x_push_node(con);
     }
     return true;
index c4b8cd087b16b9ccc9026d152a18647bf089bc6c..47abe2b49483d5cf0425d23bcf10885151c4f7de 100644 (file)
@@ -980,7 +980,8 @@ static bool handle_normal_hints(void *data, xcb_connection_t *conn, uint8_t stat
         Con *floating = con_inside_floating(con);
         if (floating) {
             floating_check_size(con, false);
-            tree_render();
+            render_con(con);
+            x_push_changes(croot);
         }
     }