mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>
Subject: [PATCH 2/3] perf ui: Make ui_browser__run exit on unhandled hot keys
Date: Sat, 17 Jul 2010 22:48:55 -0300	[thread overview]
Message-ID: <1279417736-4396-3-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1279417736-4396-1-git-send-email-acme@infradead.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

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>
---
 tools/perf/util/newt.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 932f124..7979003 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -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;
-- 
1.6.2.5


  parent reply	other threads:[~2010-07-18  1:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-18  1:48 [GIT PULL 0/3] perf/core improvements Arnaldo Carvalho de Melo
2010-07-18  1:48 ` [PATCH 1/3] perf ui: Make END go to the last entry, not the top of the last page Arnaldo Carvalho de Melo
2010-07-18  1:48 ` Arnaldo Carvalho de Melo [this message]
2010-07-18  1:48 ` [PATCH 3/3] perf hists: Factor out duplicated code Arnaldo Carvalho de Melo
2010-07-18  7:17 ` [GIT PULL 0/3] perf/core improvements Ingo Molnar
2010-07-19  9:51   ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279417736-4396-3-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®