aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslyshot <slyshot@slyshot.net>2023-06-18 11:29:52 -0400
committerOrestis Floros <orestisflo@gmail.com>2023-07-21 13:52:44 +0200
commit6fe98f7847fd5115a5d4103da88207927e0eb283 (patch)
tree20933d4de48c7a78f39a0e48c5b2810c4031a827
parent99478904728b4624a87f2b8c05c442c42d55f985 (diff)
downloadi3-6fe98f7847fd5115a5d4103da88207927e0eb283.tar.gz
i3-6fe98f7847fd5115a5d4103da88207927e0eb283.zip
Remove focus workaround
-rw-r--r--src/commands.c7
-rw-r--r--src/move.c1
2 files changed, 1 insertions, 7 deletions
diff --git a/src/commands.c b/src/commands.c
index b5bc2416..009e98bf 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -1578,7 +1578,6 @@ void cmd_move_direction(I3_CMD, const char *direction_str, long amount, const ch
owindow *current;
HANDLE_EMPTY_MATCH;
- Con *initially_focused = focused;
direction_t direction = parse_direction(direction_str);
const bool is_ppt = mode && strcmp(mode, "ppt") == 0;
@@ -1612,12 +1611,6 @@ void cmd_move_direction(I3_CMD, const char *direction_str, long amount, const ch
}
}
- /* The move command should not disturb focus. con_exists is called because
- * tree_move calls tree_flatten. */
- if (focused != initially_focused && con_exists(initially_focused)) {
- con_activate(initially_focused);
- }
-
// XXX: default reply for now, make this a better reply
ysuccess(true);
}
diff --git a/src/move.c b/src/move.c
index 1a161647..d368a4d3 100644
--- a/src/move.c
+++ b/src/move.c
@@ -241,6 +241,7 @@ static void move_to_output_directed(Con *con, direction_t direction) {
con_focus(con);
focused = old_ws;
workspace_show(ws);
+ con_focus(con);
}
/* force re-painting the indicators */