mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user