From dd653479b2439a2692328c0096798868d1dfb34b Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 22 Jun 2011 13:52:56 +0000 Subject: Ensure top level browser window has focus by default. svn path=/trunk/netsurf/; revision=12495 --- desktop/browser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'desktop') diff --git a/desktop/browser.c b/desktop/browser.c index 333f22516..5a663e34d 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -238,6 +238,7 @@ struct browser_window *browser_window_create(const char *url, bw->border = true; bw->no_resize = true; bw->last_action = wallclock(); + bw->focus = bw; bw->sel = selection_create(); selection_set_browser_window(bw->sel, bw); @@ -1234,7 +1235,7 @@ void browser_window_destroy_internal(struct browser_window *bw) top = top->parent; if (top->focus == bw) - top->focus = NULL; + top->focus = top; } /* Destruction order is important: we must ensure that the frontend -- cgit v1.2.3