mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
DesktopWindowTreeHostWin ("Chrome_WidgetWin_0") focus needs to be set synchronously in response to the parent window WM_SETFOCUS message and before the associated call to WebContents::Focus. See updated comments in CefBrowserPlatformDelegateNativeWin::SetFocus.
This commit is contained in:
@@ -233,13 +233,12 @@ bool CefBrowserHostBase::HasView() {
|
||||
}
|
||||
|
||||
void CefBrowserHostBase::SetFocus(bool focus) {
|
||||
// Always execute asynchronously to work around issue #3040.
|
||||
CEF_POST_TASK(CEF_UIT, base::BindOnce(&CefBrowserHostBase::SetFocusInternal,
|
||||
this, focus));
|
||||
}
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::BindOnce(&CefBrowserHostBase::SetFocus, this, focus));
|
||||
return;
|
||||
}
|
||||
|
||||
void CefBrowserHostBase::SetFocusInternal(bool focus) {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (focus)
|
||||
OnSetFocus(FOCUS_SOURCE_SYSTEM);
|
||||
else if (platform_delegate_)
|
||||
|
Reference in New Issue
Block a user