diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-08-20 00:16:52 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-08-20 00:16:52 +0100 |
commit | 4dc4d8b318c9bee25ca9b2982495b2906cc76287 (patch) | |
tree | ce55d6902a33a0e00c388a65a450e05d19dd4d2c /desktop/textinput.c | |
parent | c0e27bd0da9c6804c788473b891bff6c0c98af66 (diff) | |
download | netsurf-4dc4d8b318c9bee25ca9b2982495b2906cc76287.tar.gz netsurf-4dc4d8b318c9bee25ca9b2982495b2906cc76287.tar.bz2 |
add miscellaneous event to browser window callback table
extend the browser window callback table with a miscallaneous event
entry. This is used to replace all browser window callbacks which
take no parameters.
This reduces the API surface from seven separate calls to a single
call with an enumeration which may be readily extended.
The initial implementation in the frontends simply calls the original
implementations to reduce scope for errors.
Diffstat (limited to 'desktop/textinput.c')
-rw-r--r-- | desktop/textinput.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop/textinput.c b/desktop/textinput.c index 660f01a4a..f8da3d86b 100644 --- a/desktop/textinput.c +++ b/desktop/textinput.c @@ -93,13 +93,14 @@ void browser_window_remove_caret(struct browser_window *bw, bool only_hide) root_bw = browser_window_get_root(bw); assert(root_bw != NULL); - if (only_hide) + if (only_hide) { root_bw->can_edit = true; - else + } else { root_bw->can_edit = false; + } if (root_bw->window) { - guit->window->remove_caret(root_bw->window); + guit->window->event(root_bw->window, GW_EVENT_REMOVE_CARET); } } |