From bb8f2927aec8801040086bd4cb828b6eeb39763d Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Sat, 11 Apr 2020 10:52:35 +0200 Subject: [PATCH 1/2] Call tree_render if floating move changes workspace This fixes a bug where moving a floating container with cmd_move_direction displays a "broken" state if the container crosses workspace boundaries. --- src/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.c b/src/commands.c index 14bd877d..ae3e09a9 100644 --- a/src/commands.c +++ b/src/commands.c @@ -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; From 755d306df3aab4f1117b852c183bbc49b9ef1be2 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Sat, 11 Apr 2020 11:08:55 +0200 Subject: [PATCH 2/2] Revert "floating_reposition: avoid extra tree_render" This reverts commit 204eefc67975f0ed1afb3b513f8fc4eb2020d2f6. workspace_show does not call tree_render --- src/floating.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/floating.c b/src/floating.c index 2bf9ae94..6fd9d9c9 100644 --- a/src/floating.c +++ b/src/floating.c @@ -745,16 +745,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; }