floating_maybe_reassign_ws: show workspace before focusing

With this change i3 will correctly switch to the focused workspace.
This fixes bug with moving floating windows with 'move <direction>' or by dragging like _NET_CURRENT_DESKTOP not getting updated or 'workspace back_and_forth' not working.

Fixes #2921.
This commit is contained in:
Orestis Floros 2017-12-09 15:35:05 +02:00
parent 23cfbc54c5
commit 87ed8df4fa
1 changed files with 1 additions and 0 deletions

View File

@ -449,6 +449,7 @@ bool floating_maybe_reassign_ws(Con *con) {
Con *ws = TAILQ_FIRST(&(content->focus_head));
DLOG("Moving con %p / %s to workspace %p / %s\n", con, con->name, ws, ws->name);
con_move_to_workspace(con, ws, false, true, false);
workspace_show(ws);
con_focus(con_descend_focused(con));
return true;
}