diff options
Diffstat (limited to 'views/focus/focus_manager_win.cc')
-rw-r--r-- | views/focus/focus_manager_win.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/views/focus/focus_manager_win.cc b/views/focus/focus_manager_win.cc index a073a4c..fbccf7b 100644 --- a/views/focus/focus_manager_win.cc +++ b/views/focus/focus_manager_win.cc @@ -23,10 +23,7 @@ void FocusManager::FocusNativeView(gfx::NativeView native_view) { // static FocusManager* FocusManager::GetFocusManagerForNativeView( gfx::NativeView native_view) { - HWND root = ::GetAncestor(native_view, GA_ROOT); - if (!root) - return NULL; - WidgetWin* widget = WidgetWin::GetWidget(root); + WidgetWin* widget = WidgetWin::GetRootWidget(native_view); return widget ? widget->GetFocusManager() : NULL; } |