summaryrefslogtreecommitdiffstats
path: root/views/view_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/view_win.cc')
-rw-r--r--views/view_win.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/views/view_win.cc b/views/view_win.cc
index bf265f9..c61363d 100644
--- a/views/view_win.cc
+++ b/views/view_win.cc
@@ -17,6 +17,18 @@
namespace views {
+FocusManager* View::GetFocusManager() {
+ Widget* widget = GetWidget();
+ if (!widget)
+ return NULL;
+
+ HWND hwnd = widget->GetNativeView();
+ if (!hwnd)
+ return NULL;
+
+ return FocusManager::GetFocusManager(hwnd);
+}
+
void View::DoDrag(const MouseEvent& e, int press_x, int press_y) {
int drag_operations = GetDragOperations(press_x, press_y);
if (drag_operations == DragDropTypes::DRAG_NONE)
@@ -43,7 +55,7 @@ void View::Focus() {
// messages.
FocusManager* focus_manager = GetFocusManager();
if (focus_manager)
- focus_manager->FocusNativeView(GetRootView()->GetWidget()->GetNativeView());
+ focus_manager->FocusHWND(GetRootView()->GetWidget()->GetNativeView());
}
int View::GetHorizontalDragThreshold() {