commit - 0bf7f15321b5345c5f024cd18cede1959da68873
commit + acdafe9c25c0e859deb1540d58c50723221f12c8
blob - 7fbce6f00ea8ba6441c983e6bcd049840196dce6
blob + 19f8a058e47ae867d2b187b9c3a0d687d1b2d0c2
--- tog/tog.c
+++ tog/tog.c
int focussed;
struct tog_view *parent;
struct tog_view *child;
- int child_focussed;
/* type-specific state */
enum tog_view_type type;
case '\t':
if (view->child) {
*focus = view->child;
- view->child_focussed = 1;
} else if (view->parent) {
*focus = view->parent;
- view->parent->child_focussed = 0;
}
break;
case 'q':
break;
if (view_is_splitscreen(view->child)) {
*focus = view->child;
- view->child_focussed = 1;
err = view_fullscreen(view->child);
} else
err = view_splitscreen(view->child);
} else {
if (view_is_splitscreen(view)) {
*focus = view;
- view->parent->child_focussed = 1;
err = view_fullscreen(view);
} else {
err = view_splitscreen(view);
view_needs_focus_indication(struct tog_view *view)
{
if (view_is_parent_view(view)) {
- if (view->child == NULL || view->child_focussed)
+ if (view->child == NULL || view->child->focussed)
return 0;
if (!view_is_splitscreen(view->child))
return 0;
else
view = NULL;
if (view) {
- if (view->child && view->child_focussed)
+ if (view->child &&
+ view->child->focussed)
focus_view = view->child;
else
focus_view = view;
break;
}
*focus_view = diff_view;
- view->child_focussed = 1;
} else
*new_view = diff_view;
break;
break;
}
*focus_view = tree_view;
- view->child_focussed = 1;
} else
*new_view = tree_view;
break;
break;
}
*focus_view = ref_view;
- view->child_focussed = 1;
} else
*new_view = ref_view;
break;
break;
}
*focus_view = diff_view;
- view->child_focussed = 1;
} else
*new_view = diff_view;
if (err)
break;
}
*focus_view = log_view;
- view->child_focussed = 1;
} else
*new_view = log_view;
break;
break;
}
*focus_view = ref_view;
- view->child_focussed = 1;
} else
*new_view = ref_view;
break;
break;
}
*focus_view = blame_view;
- view->child_focussed = 1;
} else
*new_view = blame_view;
}
break;
}
*focus_view = log_view;
- view->child_focussed = 1;
} else
*new_view = log_view;
break;
break;
}
*focus_view = tree_view;
- view->child_focussed = 1;
} else
*new_view = tree_view;
break;