aboutsummaryrefslogtreecommitdiff
path: root/sway/movement.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/movement.c')
-rw-r--r--sway/movement.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/movement.c b/sway/movement.c
index a55d0350..166e6508 100644
--- a/sway/movement.c
+++ b/sway/movement.c
@@ -5,7 +5,7 @@
#include "layout.h"
#include "movement.h"
-int move_focus(enum movement_direction direction) {
+bool move_focus(enum movement_direction direction) {
swayc_t *current = get_focused_container(&root_container);
swayc_t *parent = current->parent;
@@ -14,12 +14,12 @@ int move_focus(enum movement_direction direction) {
parent = parent->parent;
if (parent->type == C_ROOT) {
sway_log(L_DEBUG, "Focus cannot move to parent");
- return 1;
+ return false;
} else {
sway_log(L_DEBUG, "Moving focus away from %p", current);
unfocus_all(parent);
focus_view(parent);
- return 0;
+ return true;
}
}
@@ -56,7 +56,7 @@ int move_focus(enum movement_direction direction) {
} else {
unfocus_all(&root_container);
focus_view(parent->children->items[desired]);
- return 0;
+ return true;
}
}
if (!can_move) {
@@ -65,7 +65,7 @@ int move_focus(enum movement_direction direction) {
parent = parent->parent;
if (parent->type == C_ROOT) {
// Nothing we can do
- return 1;
+ return false;
}
}
}