diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-31 21:21:26 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-02 11:12:18 -0400 |
commit | b2d871cfe215a82266d01847f4787bbcf8c721c9 (patch) | |
tree | 87dbae47c65d56730c816d7e6e2123e5e851dec2 /sway/commands/focus.c | |
parent | Merge pull request #1684 from swaywm/follow-warp (diff) | |
download | sway-b2d871cfe215a82266d01847f4787bbcf8c721c9.tar.gz sway-b2d871cfe215a82266d01847f4787bbcf8c721c9.tar.zst sway-b2d871cfe215a82266d01847f4787bbcf8c721c9.zip |
Partially implement move command
Works:
- move [container|window] to workspace <name>
- Note, this should be able to move C_CONTAINER but this is untested
- move [workspace] to output [left|right|up|down|<name>]
Not implemented yet:
- move [left|right|up|down]
- move scratchpad
- move position
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r-- | sway/commands/focus.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index 64f079f4..0a521b9e 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c | |||
@@ -20,10 +20,6 @@ static bool parse_movement_direction(const char *name, | |||
20 | *out = MOVE_PARENT; | 20 | *out = MOVE_PARENT; |
21 | } else if (strcasecmp(name, "child") == 0) { | 21 | } else if (strcasecmp(name, "child") == 0) { |
22 | *out = MOVE_CHILD; | 22 | *out = MOVE_CHILD; |
23 | } else if (strcasecmp(name, "next") == 0) { | ||
24 | *out = MOVE_NEXT; | ||
25 | } else if (strcasecmp(name, "prev") == 0) { | ||
26 | *out = MOVE_PREV; | ||
27 | } else { | 23 | } else { |
28 | return false; | 24 | return false; |
29 | } | 25 | } |
@@ -51,7 +47,8 @@ struct cmd_results *cmd_focus(int argc, char **argv) { | |||
51 | "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'"); | 47 | "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'"); |
52 | } | 48 | } |
53 | 49 | ||
54 | struct sway_container *next_focus = container_get_in_direction(con, seat, direction); | 50 | struct sway_container *next_focus = container_get_in_direction( |
51 | con, seat, direction); | ||
55 | if (next_focus) { | 52 | if (next_focus) { |
56 | sway_seat_set_focus(seat, next_focus); | 53 | sway_seat_set_focus(seat, next_focus); |
57 | } | 54 | } |