Author: stevef
Date: Sun Nov 20 12:38:33 2011
New Revision: 13157
URL:
http://source.netsurf-browser.org?rev=13157&view=rev
Log:
Don't pass already handled keys to the URL Complete code.
Don't scroll browser windows when the toolbar has focus.
Modified:
trunk/netsurf/riscos/toolbar.c
trunk/netsurf/riscos/window.c
Modified: trunk/netsurf/riscos/toolbar.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/riscos/toolbar.c?rev=1315...
==============================================================================
--- trunk/netsurf/riscos/toolbar.c (original)
+++ trunk/netsurf/riscos/toolbar.c Sun Nov 20 12:38:33 2011
@@ -1153,6 +1153,12 @@
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.
*
@@ -1165,11 +1171,6 @@
toolbar->url, 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;
}
Modified: trunk/netsurf/riscos/window.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/riscos/window.c?rev=13157...
==============================================================================
--- trunk/netsurf/riscos/window.c (original)
+++ trunk/netsurf/riscos/window.c Sun Nov 20 12:38:33 2011
@@ -2036,9 +2036,6 @@
case IS_WIMP_KEY | wimp_KEY_RIGHT:
case IS_WIMP_KEY | wimp_KEY_CONTROL | wimp_KEY_LEFT:
case IS_WIMP_KEY | wimp_KEY_CONTROL | wimp_KEY_RIGHT:
- if (is_toolbar)
- return false;
- break;
case IS_WIMP_KEY + wimp_KEY_UP:
case IS_WIMP_KEY + wimp_KEY_DOWN:
case IS_WIMP_KEY + wimp_KEY_PAGE_UP:
@@ -2046,6 +2043,8 @@
case wimp_KEY_HOME:
case IS_WIMP_KEY | wimp_KEY_CONTROL | wimp_KEY_UP:
case IS_WIMP_KEY + wimp_KEY_END:
+ if (is_toolbar)
+ return false;
break;
default:
return false; /* This catches any keys we don't want to claim */