Skip to content

Commit

Permalink
perf ui: Make ui_browser__run exit on unhandled hot keys
Browse files Browse the repository at this point in the history
Right now ENTER doesn't always exits the newt tree widget, as it is used
for expanding/collapsing branches, but with the new tree widget being
developed we need to regain control to handle it, expanding/collapsing
branches.

In fact its really up to the ui_browser user to state what extra keys
should stop ui_browser__run, and it should handle just the ones needed
for basic browsing.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Jul 17, 2010
1 parent 63f20e7 commit b66ecd9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tools/perf/util/newt.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,8 @@ static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es)
self->first_visible_entry_idx = self->index - offset;
self->seek(self, -offset, SEEK_END);
break;
case NEWT_KEY_RIGHT:
case NEWT_KEY_LEFT:
case NEWT_KEY_TAB:
return es->u.key;
default:
continue;
return es->u.key;
}
if (ui_browser__refresh_entries(self) < 0)
return -1;
Expand Down

0 comments on commit b66ecd9

Please sign in to comment.