summaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorminus <[email protected]>2015-08-25 19:00:20 +0200
committerminus <[email protected]>2015-08-25 19:00:20 +0200
commite854a54e9631c405b26c08cf0f5d085a1b5949e6 (patch)
tree9a28d0e8a78d3350222e02220aa0c203f2a7c4e3 /sway/commands.c
parent03e4a97dbe5391cfaa7e9d3f1da86fa0a5fa4b4f (diff)
changed workspace_{outout_,}{next,prev} to return workspace
so it can be reused for "move container to workspace next"
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 23339b9d..74c19b5b 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -668,23 +668,23 @@ static bool cmd_workspace(struct sway_config *config, int argc, char **argv) {
if (argc == 1) {
// Handle workspace next/prev
if (strcmp(argv[0], "next") == 0) {
- workspace_next();
+ workspace_switch(workspace_next());
return true;
}
if (strcmp(argv[0], "prev") == 0) {
- workspace_next();
+ workspace_switch(workspace_prev());
return true;
}
// Handle workspace output_next/prev
if (strcmp(argv[0], "next_on_output") == 0) {
- workspace_output_next();
+ workspace_switch(workspace_output_next());
return true;
}
if (strcmp(argv[0], "prev_on_output") == 0) {
- workspace_output_prev();
+ workspace_switch(workspace_output_prev());
return true;
}