diff options
author | 2015-08-09 23:04:37 -0400 | |
---|---|---|
committer | 2015-08-09 23:04:37 -0400 | |
commit | f6e65b6bb235cd77329e961e180e2236312ebacc (patch) | |
tree | 1cef31857263d39c1ce189e1b12c08d5c181d046 /sway/movement.c | |
parent | Fix bug with focus parent (diff) | |
download | sway-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.c | 6 |
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 | ||
8 | void move_focus(enum movement_direction direction) { | 8 | int 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 | } |