From d2d6d6e0a86e479ab799e84a1ba15b0c13d288f0 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Tue, 2 Oct 2018 02:15:59 +0300 Subject: [PATCH] Re-render floating cons alone when possible --- src/floating.c | 6 ++---- src/handlers.c | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/floating.c b/src/floating.c index c8b436b4..bfb130fb 100644 --- a/src/floating.c +++ b/src/floating.c @@ -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; diff --git a/src/handlers.c b/src/handlers.c index c4b8cd08..47abe2b4 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -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); } } -- 2.39.2