Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Re-render floating cons alone when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
orestisfl committed Nov 12, 2018
1 parent 100d05a commit d2d6d6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/floating.c
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/handlers.c
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit d2d6d6e

Please sign in to comment.