aboutsummaryrefslogtreecommitdiffstats
path: root/sway/movement.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-09 23:04:37 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-09 23:04:37 -0400
commitf6e65b6bb235cd77329e961e180e2236312ebacc (patch)
tree1cef31857263d39c1ce189e1b12c08d5c181d046 /sway/movement.c
parentFix bug with focus parent (diff)
downloadsway-f6e65b6bb235cd77329e961e180e2236312ebacc.tar.gz
sway-f6e65b6bb235cd77329e961e180e2236312ebacc.tar.zst
sway-f6e65b6bb235cd77329e961e180e2236312ebacc.zip
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 @@
5#include "layout.h" 5#include "layout.h"
6#include "movement.h" 6#include "movement.h"
7 7
8void move_focus(enum movement_direction direction) { 8int move_focus(enum movement_direction direction) {
9 swayc_t *current = get_focused_container(&root_container); 9 swayc_t *current = get_focused_container(&root_container);
10 swayc_t *parent = current->parent; 10 swayc_t *parent = current->parent;
11 11
@@ -42,7 +42,7 @@ void move_focus(enum movement_direction direction) {
42 } else { 42 } else {
43 unfocus_all(&root_container); 43 unfocus_all(&root_container);
44 focus_view(parent->children->items[desired]); 44 focus_view(parent->children->items[desired]);
45 return; 45 return 0;
46 } 46 }
47 } 47 }
48 if (!can_move) { 48 if (!can_move) {
@@ -51,7 +51,7 @@ void move_focus(enum movement_direction direction) {
51 parent = parent->parent; 51 parent = parent->parent;
52 if (parent->type == C_ROOT) { 52 if (parent->type == C_ROOT) {
53 // Nothing we can do 53 // Nothing we can do
54 return; 54 return 1;
55 } 55 }
56 } 56 }
57 } 57 }