Commit 758194b584cabffe1f0e63d3c223373757dfb34a

Stefan Sperling 2018-10-24T10:45:03

tog: show appropriate panels when current view is moved into focus

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/tog/tog.c b/tog/tog.c
index 898f650..931b4f2 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -693,8 +693,11 @@ view_loop(struct tog_view *view)
 		}
 		if (view) {
 			if (focus_view == NULL) {
+				view->focussed = 1;
+				show_panel(view->panel);
+				if (view->child && view_is_splitscreen(view->child))
+					show_panel(view->child->panel);
 				focus_view = view;
-				focus_view->focussed = 1;
 			}
 			if (view->parent) {
 				err = view->parent->show(view->parent);