summaryrefslogtreecommitdiff
path: root/riscos/toolbar.c
diff options
context:
space:
mode:
authorSteve Fryatt <steve@stevefryatt.org.uk>2011-11-20 18:38:33 +0000
committerSteve Fryatt <steve@stevefryatt.org.uk>2011-11-20 18:38:33 +0000
commit747c66c982cd36979e17d2b845f93559a9d5affd (patch)
tree528496fe301e1ebcb6964f4ccf91ac9f7ef10cd2 /riscos/toolbar.c
parent98378081a78922e191b4c71a8a39a90eba70d99c (diff)
downloadnetsurf-747c66c982cd36979e17d2b845f93559a9d5affd.tar.gz
netsurf-747c66c982cd36979e17d2b845f93559a9d5affd.tar.bz2
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
Diffstat (limited to 'riscos/toolbar.c')
-rw-r--r--riscos/toolbar.c11
1 files changed, 6 insertions, 5 deletions
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;
}