Merge pull request #3196 from orestisf1993/_con_move_to_con

_con_move_to_con cleanup
This commit is contained in:
Ingo Bürk 2018-03-24 18:49:26 +01:00 committed by GitHub
commit b849fe3e44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 19 deletions

View File

@ -1170,20 +1170,6 @@ static bool _con_move_to_con(Con *con, Con *target, bool behind_focused, bool fi
floating_fix_coordinates(con, &(source_output->rect), &(dest_output->rect)); floating_fix_coordinates(con, &(source_output->rect), &(dest_output->rect));
} else } else
DLOG("Not fixing coordinates, fix_coordinates flag = %d\n", fix_coordinates); DLOG("Not fixing coordinates, fix_coordinates flag = %d\n", fix_coordinates);
/* If moving to a visible workspace, call show so it can be considered
* focused. Must do before attaching because workspace_show checks to see
* if focused container is in its area. */
if (!ignore_focus && workspace_is_visible(target_ws)) {
workspace_show(target_ws);
/* Dont warp if told so (when dragging floating windows with the
* mouse for example) */
if (dont_warp)
x_set_warp_to(NULL);
else
x_set_warp_to(&(con->rect));
}
} }
/* If moving a fullscreen container and the destination already has a /* If moving a fullscreen container and the destination already has a
@ -1222,15 +1208,11 @@ static bool _con_move_to_con(Con *con, Con *target, bool behind_focused, bool fi
/* Restore focus if the output's focused workspace has changed. */ /* Restore focus if the output's focused workspace has changed. */
if (con_get_workspace(focused) != old_focus) if (con_get_workspace(focused) != old_focus)
con_activate(old_focus); con_focus(old_focus);
} }
/* 7: when moving to another workspace, we leave the focus on the current /* 7: when moving to another workspace, we leave the focus on the current
* workspace. (see also #809) */ * workspace. (see also #809) */
/* Descend focus stack in case focus_next is a workspace which can
* occur if we move to the same workspace. Also show current workspace
* to ensure it is focused. */
if (!ignore_focus) { if (!ignore_focus) {
workspace_show(current_ws); workspace_show(current_ws);
if (dont_warp) { if (dont_warp) {