summaryrefslogtreecommitdiff
path: root/sway/movement.c
diff options
context:
space:
mode:
authorTaiyu <[email protected]>2015-08-14 12:42:19 -0700
committerTaiyu <[email protected]>2015-08-14 12:42:19 -0700
commitb8cba33c013e580e6e793ec67a5442407d94a002 (patch)
treed3a197d4297269716049fa6c09ad59ef350cfff5 /sway/movement.c
parent3a3c50135fabc6a23f7b130effef9b642e54bf3c (diff)
changed swayc related functions, cleaned up some functions, moved wlc related things into handlers
Diffstat (limited to 'sway/movement.c')
-rw-r--r--sway/movement.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sway/movement.c b/sway/movement.c
index 166e6508..de987679 100644
--- a/sway/movement.c
+++ b/sway/movement.c
@@ -10,14 +10,12 @@ bool move_focus(enum movement_direction direction) {
swayc_t *parent = current->parent;
if (direction == MOVE_PARENT) {
- current = parent;
- parent = parent->parent;
- if (parent->type == C_ROOT) {
+ if (parent->type == C_OUTPUT) {
sway_log(L_DEBUG, "Focus cannot move to parent");
return false;
} else {
- sway_log(L_DEBUG, "Moving focus away from %p", current);
- unfocus_all(parent);
+ sway_log(L_DEBUG, "Moving focus away from %p to %p", current, parent);
+ unfocus_all(parent->parent);
focus_view(parent);
return true;
}