floating_reposition: avoid extra tree_render

This commit is contained in:
Orestis Floros 2018-10-05 14:29:29 +03:00
parent 36a972d851
commit 204eefc679
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 6 additions and 2 deletions

View 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;
}