diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-26 12:47:15 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-27 10:24:31 -0400 |
commit | 63160f73e7baa6618f19d7681bcab5be5c557205 (patch) | |
tree | 10ad4ed0c2b6721025666afd13b3b20f63069c1f /tools | |
parent | 06daaaba7c211ca6a8227b9a54dbc86dd837f034 (diff) |
perf ui: Consider the refreshed dimensions in ui_browser__show
When we call ui_browser__show we may have called
ui_browser__refresh_dimensions to check if the maximum lenght for the
contained entries changed, such as when zooming in and out DSOs or
threads in the hist browser.
For that to happen we must delete the old form, that will take care of
deleting the vertical scrollbar, etc, and then recreate them, with the
new dimensions.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/newt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 2f5f7a1878cf..aed21490ccdc 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c | |||
@@ -342,8 +342,10 @@ static void ui_browser__reset_index(struct ui_browser *self) | |||
342 | 342 | ||
343 | static int ui_browser__show(struct ui_browser *self, const char *title) | 343 | static int ui_browser__show(struct ui_browser *self, const char *title) |
344 | { | 344 | { |
345 | if (self->form != NULL) | 345 | if (self->form != NULL) { |
346 | return 0; | 346 | newtFormDestroy(self->form); |
347 | newtPopWindow(); | ||
348 | } | ||
347 | ui_browser__refresh_dimensions(self); | 349 | ui_browser__refresh_dimensions(self); |
348 | newtCenteredWindow(self->width + 2, self->height, title); | 350 | newtCenteredWindow(self->width + 2, self->height, title); |
349 | self->form = newt_form__new(); | 351 | self->form = newt_form__new(); |