From: Steve Lamerton Date: Sun, 13 Nov 2011 12:57:28 +0000 (+0000) Subject: Set focus on the browser window after loading a url. Also fix a warning. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c49d2434e3698c1309e3cd4f4af88d238630e8b9 Set focus on the browser window after loading a url. Also fix a warning. Closes #13660 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index 2563dfc5c7..325111fa00 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -381,7 +381,7 @@ void WebFrame::UpdateState() m_url->SetValue( m_browser->GetCurrentURL() ); } -void WebFrame::OnIdle(wxIdleEvent& evt) +void WebFrame::OnIdle(wxIdleEvent& WXUNUSED(evt)) { if(m_browser->IsBusy()) { @@ -401,6 +401,7 @@ void WebFrame::OnIdle(wxIdleEvent& evt) void WebFrame::OnUrl(wxCommandEvent& WXUNUSED(evt)) { m_browser->LoadURL( m_url->GetValue() ); + m_browser->SetFocus(); UpdateState(); }