aboutsummaryrefslogtreecommitdiff
path: root/sway/movement.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-16 14:47:08 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-16 14:47:08 -0400
commit19c0ec6a08fd8462bc2060b657277250452eb2ba (patch)
treee75b0b5b064507ab7b5718bd39e6802aa56b9eed /sway/movement.c
parent5ff71c2d5ca7fd64b9be37e3548ac70ba1a4ef1c (diff)
Fix movement between outputs
Diffstat (limited to 'sway/movement.c')
-rw-r--r--sway/movement.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/movement.c b/sway/movement.c
index de987679..12726392 100644
--- a/sway/movement.c
+++ b/sway/movement.c
@@ -28,7 +28,7 @@ bool move_focus(enum movement_direction direction) {
bool can_move = false;
int diff = 0;
if (direction == MOVE_LEFT || direction == MOVE_RIGHT) {
- if (parent->layout == L_HORIZ) {
+ if (parent->layout == L_HORIZ || parent->type == C_ROOT) {
can_move = true;
diff = direction == MOVE_LEFT ? -1 : 1;
}
@@ -61,7 +61,7 @@ bool move_focus(enum movement_direction direction) {
sway_log(L_DEBUG, "Can't move at current level, moving up tree");
current = parent;
parent = parent->parent;
- if (parent->type == C_ROOT) {
+ if (!parent) {
// Nothing we can do
return false;
}