mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
Revert "Refactor tree"
This commit is contained in:
parent
6b7841b11f
commit
d0c7f66e95
39 changed files with 588 additions and 593 deletions
|
|
@ -3,11 +3,10 @@
|
|||
#include "log.h"
|
||||
#include "sway/input/input-manager.h"
|
||||
#include "sway/input/seat.h"
|
||||
#include "sway/tree/view.h"
|
||||
#include "sway/view.h"
|
||||
#include "sway/commands.h"
|
||||
|
||||
static bool parse_movement_direction(const char *name,
|
||||
enum movement_direction *out) {
|
||||
static bool parse_movement_direction(const char *name, enum movement_direction *out) {
|
||||
if (strcasecmp(name, "left") == 0) {
|
||||
*out = MOVE_LEFT;
|
||||
} else if (strcasecmp(name, "right") == 0) {
|
||||
|
|
@ -32,7 +31,7 @@ static bool parse_movement_direction(const char *name,
|
|||
}
|
||||
|
||||
struct cmd_results *cmd_focus(int argc, char **argv) {
|
||||
struct sway_container *con = config->handler_context.current_container;
|
||||
swayc_t *con = config->handler_context.current_container;
|
||||
struct sway_seat *seat = config->handler_context.seat;
|
||||
if (con->type < C_WORKSPACE) {
|
||||
return cmd_results_new(CMD_FAILURE, "focus",
|
||||
|
|
@ -51,7 +50,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
|
|||
"Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'");
|
||||
}
|
||||
|
||||
struct sway_container *next_focus = container_get_in_direction(con, seat, direction);
|
||||
swayc_t *next_focus = get_swayc_in_direction(con, seat, direction);
|
||||
if (next_focus) {
|
||||
sway_seat_set_focus(seat, next_focus);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue