Windows: Fix assignment of keyboard focus (issue #1248).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1643 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-04-04 22:26:39 +00:00
parent 199a3faafe
commit d8aed5b52d
4 changed files with 45 additions and 0 deletions

View File

@@ -1689,6 +1689,15 @@ void CefBrowserHostImpl::OnSetFocus(cef_focus_source_t source) {
if (web_contents_.get())
web_contents_->GetView()->Focus();
#if defined(OS_WIN)
if (!IsWindowRenderingDisabled()) {
// When windowed rendering is used in combination with Aura on Windows we
// need to explicitly set focus to the native window handle. Otherwise,
// the window doesn't get keyboard focus.
PlatformSetViewFocus();
}
#endif // defined(OS_WIN)
} else {
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::OnSetFocus, this, source));