From ffec7e754a800d190937b563ec0c11e40468d3ed Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 6 Jun 2011 15:14:35 +0000 Subject: [PATCH] Restore keyboard focus on window activation (issue #256). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@252 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/browser_impl_win.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/libcef/browser_impl_win.cc b/libcef/browser_impl_win.cc index 21d6f186a..dd58615ec 100644 --- a/libcef/browser_impl_win.cc +++ b/libcef/browser_impl_win.cc @@ -38,15 +38,6 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message, static_cast(ui::GetWindowUserData(hwnd)); switch (message) { - case WM_COMMAND: - { - int wmId = LOWORD(wParam); - int wmEvent = HIWORD(wParam); - - - } - break; - case WM_DESTROY: if (browser) { // Clear the user data pointer. @@ -68,13 +59,13 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message, return 0; case WM_SETFOCUS: - if (browser && browser->UIT_GetWebView()) - browser->UIT_GetWebView()->setFocus(true); + if (browser) + browser->UIT_SetFocus(browser->UIT_GetWebViewHost(), true); return 0; case WM_KILLFOCUS: - if (browser && browser->UIT_GetWebView()) - browser->UIT_GetWebView()->setFocus(false); + if (browser) + browser->UIT_SetFocus(browser->UIT_GetWebViewHost(), false); return 0; case WM_ERASEBKGND: