Set focus browser_window in place_caret.

svn path=/trunk/netsurf/; revision=12570
This commit is contained in:
Michael Drake 2011-07-04 12:15:21 +00:00
parent b1e425a967
commit 1f9b970f57
2 changed files with 3 additions and 5 deletions

View File

@ -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:

View File

@ -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;
}