From 1f9b970f57d50f5fe3f812c7ada63fe3f66478b5 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 4 Jul 2011 12:15:21 +0000 Subject: Set focus browser_window in place_caret. svn path=/trunk/netsurf/; revision=12570 --- desktop/browser.c | 5 ----- desktop/textinput.c | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/desktop/browser.c b/desktop/browser.c index a6e80d0f2..fd2e28ebc 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1741,15 +1741,10 @@ void browser_window_mouse_click(struct browser_window *bw, browser_mouse_state mouse, int x, int y) { hlcache_handle *c = bw->current_content; - struct browser_window *top; if (!c) return; - /* Set focus browser window */ - top = browser_window_get_root(bw); - top->focus = bw; - switch (content_get_type(c)) { case CONTENT_HTML: case CONTENT_TEXTPLAIN: diff --git a/desktop/textinput.c b/desktop/textinput.c index b5163b375..653d906e5 100644 --- a/desktop/textinput.c +++ b/desktop/textinput.c @@ -1201,6 +1201,9 @@ void browser_window_place_caret(struct browser_window *bw, bw->paste_callback = paste_cb; bw->move_callback = move_cb; bw->caret_p = p; + + /* Set focus browser window */ + root_bw->focus = bw; } -- cgit v1.2.3