Fix delivery of focus/blur events (issue #1301).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1717 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-06-06 19:04:21 +00:00
parent 99faa3fda4
commit 62d9365b51
17 changed files with 314 additions and 67 deletions

View File

@ -100,6 +100,24 @@ void CefBrowserHostImpl::PlatformSizeTo(int width, int height) {
}
}
void CefBrowserHostImpl::PlatformSetFocus(bool focus) {
if (!focus)
return;
if (web_contents_) {
// Give logical focus to the RenderWidgetHostViewAura in the views
// hierarchy. This does not change the native keyboard focus.
web_contents_->Focus();
}
if (window_x11_) {
// Give native focus to the DesktopNativeWidgetAura for the root window.
// Needs to be done via the ::Window so that keyboard focus is assigned
// correctly.
window_x11_->Focus();
}
}
CefWindowHandle CefBrowserHostImpl::PlatformGetWindowHandle() {
return window_info_.window;
}