aboutsummaryrefslogtreecommitdiff
path: root/sway/movement.c
diff options
context:
space:
mode:
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;
}