Restore keyboard focus on window activation (issue #256).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@252 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-06-06 15:14:35 +00:00
parent 1678a7e673
commit ffec7e754a
1 changed files with 4 additions and 13 deletions

View File

@ -38,15 +38,6 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
static_cast<CefBrowserImpl*>(ui::GetWindowUserData(hwnd)); static_cast<CefBrowserImpl*>(ui::GetWindowUserData(hwnd));
switch (message) { switch (message) {
case WM_COMMAND:
{
int wmId = LOWORD(wParam);
int wmEvent = HIWORD(wParam);
}
break;
case WM_DESTROY: case WM_DESTROY:
if (browser) { if (browser) {
// Clear the user data pointer. // Clear the user data pointer.
@ -68,13 +59,13 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
return 0; return 0;
case WM_SETFOCUS: case WM_SETFOCUS:
if (browser && browser->UIT_GetWebView()) if (browser)
browser->UIT_GetWebView()->setFocus(true); browser->UIT_SetFocus(browser->UIT_GetWebViewHost(), true);
return 0; return 0;
case WM_KILLFOCUS: case WM_KILLFOCUS:
if (browser && browser->UIT_GetWebView()) if (browser)
browser->UIT_GetWebView()->setFocus(false); browser->UIT_SetFocus(browser->UIT_GetWebViewHost(), false);
return 0; return 0;
case WM_ERASEBKGND: case WM_ERASEBKGND: