| Index: views/controls/textfield/native_textfield_win.cc
|
| ===================================================================
|
| --- views/controls/textfield/native_textfield_win.cc (revision 18286)
|
| +++ views/controls/textfield/native_textfield_win.cc (working copy)
|
| @@ -16,6 +16,7 @@
|
| #include "views/controls/native/native_view_host.h"
|
| #include "views/controls/textfield/native_textfield_win.h"
|
| #include "views/controls/textfield/textfield.h"
|
| +#include "views/focus/focus_manager.h"
|
| #include "views/focus/focus_util_win.h"
|
| #include "views/views_delegate.h"
|
| #include "views/widget/widget.h"
|
| @@ -667,6 +668,18 @@
|
| }
|
| }
|
|
|
| +void NativeTextfieldWin::OnSetFocus(HWND hwnd) {
|
| + SetMsgHandled(FALSE); // We still want the default processing of the message.
|
| +
|
| + views::FocusManager* focus_manager =
|
| + views::FocusManager::GetFocusManager(m_hWnd);
|
| + if (!focus_manager) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| + focus_manager->SetFocusedView(textfield_);
|
| +}
|
| +
|
| void NativeTextfieldWin::OnSysChar(TCHAR ch, UINT repeat_count, UINT flags) {
|
| // Nearly all alt-<xxx> combos result in beeping rather than doing something
|
| // useful, so we discard most. Exceptions:
|
|
|