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

Commit

Permalink
Merge pull request #4011 from orestisfl/floating_reposition-needs_tre…
Browse files Browse the repository at this point in the history
…e_render

Call tree_render if floating move changes workspace
  • Loading branch information
Airblader committed Apr 11, 2020
2 parents 93bb202 + 755d306 commit f4b1da7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ void cmd_move_direction(I3_CMD, const char *direction_str, long move_px) {
break;
}

floating_reposition(current->con->parent, newrect);
cmd_output->needs_tree_render = floating_reposition(current->con->parent, newrect);
} else {
tree_move(current->con, direction);
cmd_output->needs_tree_render = true;
Expand Down
7 changes: 2 additions & 5 deletions src/floating.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,16 +751,13 @@ bool floating_reposition(Con *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 (con->scratchpad_state == SCRATCHPAD_FRESH)
con->scratchpad_state = SCRATCHPAD_CHANGED;

/* Workspace change will already result in a tree_render. */
if (!reassigned) {
tree_render();
}
tree_render();
return true;
}

Expand Down

0 comments on commit f4b1da7

Please sign in to comment.