]> git.saurik.com Git - wxWidgets.git/commitdiff
Set focus on the browser window after loading a url. Also fix a warning.
authorSteve Lamerton <steve.lamerton@gmail.com>
Sun, 13 Nov 2011 12:57:28 +0000 (12:57 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Sun, 13 Nov 2011 12:57:28 +0000 (12:57 +0000)
Closes #13660

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/webview/webview.cpp

index 2563dfc5c7e4730fcccbb9a4c71d830f5303cd17..325111fa0074f93cfe26cf7cb8a3856c7e9675bb 100644 (file)
@@ -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();
 }