From 037b1c371097d4fae545f26c5c55365b8cdefdd8 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Fri, 23 Mar 2018 12:56:30 +0200 Subject: [PATCH] _con_move_to_con: showing target_ws is useless The current_ws is shown latter anyway: if (!ignore_focus) { workspace_show(current_ws); ... This also causes the following bug: - Open a window in an empty workspace - Switch to another workspace - seturgent to the first window - Move another window to the first workspace - Urgent flag is now reset --- src/con.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/con.c b/src/con.c index 985d07da..25bea8e5 100644 --- a/src/con.c +++ b/src/con.c @@ -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)); } else 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); - - /* Don’t 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 -- 2.39.5