aboutsummaryrefslogtreecommitdiff
path: root/sway/movement.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-14 16:59:38 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-14 16:59:38 -0400
commit5a8f464bc199f94a0a2ee848d249fe9d57b539c6 (patch)
tree91b25c94711e87e08b94bc8de30984bc403470ab /sway/movement.c
parent3a3c50135fabc6a23f7b130effef9b642e54bf3c (diff)
parent80ae2a7774457609cbcef0bd3dc6e1a651d9b5a2 (diff)
Merge pull request #27 from taiyu-len/master
rewrote and grouped swayc related functions together.
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;
}