summaryrefslogtreecommitdiff
path: root/sway/movement.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2015-08-09 23:04:37 -0400
committerDrew DeVault <[email protected]>2015-08-09 23:04:37 -0400
commitf6e65b6bb235cd77329e961e180e2236312ebacc (patch)
tree1cef31857263d39c1ce189e1b12c08d5c181d046 /sway/movement.c
parentb49cfa0c16b442b048213296bc3f75c4e5393a6e (diff)
Don't override keys if command fails
Diffstat (limited to 'sway/movement.c')
-rw-r--r--sway/movement.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/movement.c b/sway/movement.c
index 197df7b2..108e2588 100644
--- a/sway/movement.c
+++ b/sway/movement.c
@@ -5,7 +5,7 @@
#include "layout.h"
#include "movement.h"
-void move_focus(enum movement_direction direction) {
+int move_focus(enum movement_direction direction) {
swayc_t *current = get_focused_container(&root_container);
swayc_t *parent = current->parent;
@@ -42,7 +42,7 @@ void move_focus(enum movement_direction direction) {
} else {
unfocus_all(&root_container);
focus_view(parent->children->items[desired]);
- return;
+ return 0;
}
}
if (!can_move) {
@@ -51,7 +51,7 @@ void move_focus(enum movement_direction direction) {
parent = parent->parent;
if (parent->type == C_ROOT) {
// Nothing we can do
- return;
+ return 1;
}
}
}