summaryrefslogtreecommitdiff
path: root/sway/movement.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2015-08-13 11:00:00 -0400
committerDrew DeVault <[email protected]>2015-08-13 11:00:00 -0400
commit94e81fd64c4f63815047fa1ad895cade9afa8bd4 (patch)
tree9770eded52cae4f9d3d033123e1470d7873624c5 /sway/movement.c
parent9475548f2426b3892a6d14961af36edc49b72182 (diff)
parent0a205776d7023cb8dea0d62994dff7b01d19dbcf (diff)
Merge pull request #23 from taiyu-len/master
moving things around + statics + forking + exec cleanup + fixed cmd_focus return + keep exec programs out of logs
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;
}
}
}