From 747c66c982cd36979e17d2b845f93559a9d5affd Mon Sep 17 00:00:00 2001 From: Steve Fryatt Date: Sun, 20 Nov 2011 18:38:33 +0000 Subject: Don't pass already handled keys to the URL Complete code. Don't scroll browser windows when the toolbar has focus. svn path=/trunk/netsurf/; revision=13157 --- riscos/toolbar.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'riscos/toolbar.c') diff --git a/riscos/toolbar.c b/riscos/toolbar.c index 73823394f..96bd5a8d7 100644 --- a/riscos/toolbar.c +++ b/riscos/toolbar.c @@ -1153,6 +1153,12 @@ bool ro_toolbar_keypress(wimp_key *key) if (toolbar == NULL) return false; + /* Pass the keypress on to the client and stop if they handle it. */ + + if (toolbar->callbacks->key_press != NULL && + toolbar->callbacks->key_press(toolbar->client_data, key)) + return true; + /* If the caret is in the URL bar, ask the URL Complete module if it * wants to handle the keypress. * @@ -1166,11 +1172,6 @@ bool ro_toolbar_keypress(wimp_key *key) ro_gui_url_complete_keypress(toolbar, key->c)) return true; - /* Otherwsie, pass the keypress on to the client. */ - - if (toolbar->callbacks->key_press != NULL) - return toolbar->callbacks->key_press(toolbar->client_data, key); - return false; } -- cgit v1.2.3