Merge pull request #4011 from orestisfl/floating_reposition-needs_tree_render

Call tree_render if floating move changes workspace
next
Ingo Bürk 2020-04-11 19:50:14 +02:00 committed by GitHub
commit f4b1da7f23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -1526,7 +1526,7 @@ void cmd_move_direction(I3_CMD, const char *direction_str, long move_px) {
break; break;
} }
floating_reposition(current->con->parent, newrect); cmd_output->needs_tree_render = floating_reposition(current->con->parent, newrect);
} else { } else {
tree_move(current->con, direction); tree_move(current->con, direction);
cmd_output->needs_tree_render = true; cmd_output->needs_tree_render = true;

View File

@ -751,16 +751,13 @@ bool floating_reposition(Con *con, Rect newrect) {
con->rect = newrect; con->rect = newrect;
bool reassigned = floating_maybe_reassign_ws(con); floating_maybe_reassign_ws(con);
/* If this is a scratchpad window, don't auto center it from now on. */ /* If this is a scratchpad window, don't auto center it from now on. */
if (con->scratchpad_state == SCRATCHPAD_FRESH) if (con->scratchpad_state == SCRATCHPAD_FRESH)
con->scratchpad_state = SCRATCHPAD_CHANGED; con->scratchpad_state = SCRATCHPAD_CHANGED;
/* Workspace change will already result in a tree_render. */ tree_render();
if (!reassigned) {
tree_render();
}
return true; return true;
} }