mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-23 02:42:11 +03:00
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
This commit is contained in:
parent
98378081a7
commit
747c66c982
@ -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;
|
||||
}
|
||||
|
||||
|
@ -2036,9 +2036,6 @@ bool ro_gui_window_handle_local_keypress(struct gui_window *g, wimp_key *key,
|
||||
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 @@ bool ro_gui_window_handle_local_keypress(struct gui_window *g, wimp_key *key,
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user