From: Julien Desfossez Date: Tue, 10 Apr 2012 21:17:28 +0000 (-0400) Subject: Each view can access process details view X-Git-Tag: v0.2~38 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=af54ebcf72ed12fe3a2557886d24bd8e26cc79bb;p=lttngtop.git Each view can access process details view Every time the user switches to a different view, the blue line is reset to the first line and he can use the enter key to enter in the process details view (and reuse enter to switch back). Signed-off-by: Julien Desfossez --- diff --git a/src/cursesdisplay.c b/src/cursesdisplay.c index 7dfe7ad..c18d46c 100644 --- a/src/cursesdisplay.c +++ b/src/cursesdisplay.c @@ -61,7 +61,6 @@ int max_elements = 80; int toggle_threads = -1; int toggle_pause = -1; -int toggle_tree = -1; int max_center_lines; @@ -530,6 +529,8 @@ void update_perf() if (current_line == selected_line) { selected_process = tmp; + selected_tid = tmp->tid; + selected_comm = tmp->comm; wattron(center, COLOR_PAIR(5)); mvwhline(center, current_line + header_offset, 1, ' ', COLS-3); } @@ -915,22 +916,23 @@ void *handle_keyboard(void *p) break; case KEY_F(1): - toggle_tree *= -1; current_view = cpu; + selected_line = 0; update_current_view(); break; case KEY_F(2): current_view = cpu; + selected_line = 0; update_current_view(); break; case KEY_F(3): current_view = perf; - toggle_tree = -1; + selected_line = 0; update_current_view(); break; case KEY_F(4): current_view = iostream; - toggle_tree = -1; + selected_line = 0; update_current_view(); break; case KEY_F(10):