diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-01-31 18:12:08 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-01-31 18:12:08 +0000 |
commit | 8866964740ee1c84b8e717286a882cac28022e08 (patch) | |
tree | d131b908bb648bc9535b12964e358aae572e8692 | |
parent | bf3e41a93dd7823c298714fff95221e43cf7d8a4 (diff) | |
download | netsurf-8866964740ee1c84b8e717286a882cac28022e08.tar.gz netsurf-8866964740ee1c84b8e717286a882cac28022e08.tar.bz2 |
[project @ 2004-01-31 18:12:08 by jmb]
Stop grabbing input focus on fetch completion, unless the window already
has the input focus.
svn path=/import/netsurf/; revision=519
-rw-r--r-- | riscos/window.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/riscos/window.c b/riscos/window.c index 42d5ffcc9..5939a0127 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -323,15 +323,19 @@ void gui_window_set_status(gui_window* g, const char* text) void gui_window_set_url(gui_window *g, char *url) { + wimp_caret c; strncpy(g->url, url, 255); wimp_set_icon_state(g->data.browser.toolbar, ICON_TOOLBAR_URL, 0, 0); /* Move the caret to the url bar. * It's ok to do this as this only gets * called when fetching a new page . */ - wimp_set_caret_position(g->data.browser.toolbar, - ICON_TOOLBAR_URL, - 0,0,-1, (int) strlen(g->url) - 1); + wimp_get_caret_position(&c); + if (c.w == g->window || c.w == g->data.browser.toolbar) { + wimp_set_caret_position(g->data.browser.toolbar, + ICON_TOOLBAR_URL, + 0,0,-1, (int) strlen(g->url) - 1); + } } |