Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
break;
case 13: /* FIXME : KEY_ENTER ?? */
- if (current_view == cpu) {
+ if (current_view != process_details) {
+ previous_view = current_view;
current_view = process_details;
+ } else {
+ current_view = previous_view;
+ previous_view = process_details;
}
update_current_view();
break;
#include <ncurses.h>
#include "common.h"
-enum current_view_list
+enum view_list
{
cpu = 1,
perf,
process_details,
iostream,
tree,
-} current_view;
+};
+
+enum view_list current_view;
+enum view_list previous_view;
void display(unsigned int);
void init_ncurses();