Skip to content

Commit

Permalink
Remove focus workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
slyshot authored and orestisfl committed Jul 21, 2023
1 parent 9947890 commit 6fe98f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 0 additions & 7 deletions src/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions src/move.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6fe98f7

Please sign in to comment.