Index: views/widget/root_view.cc |
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc |
index a0a752cbe55cf1ad4850284667cef64a8139e23a..8deb30f6fd36813c129b1f92046beb3e886a9d78 100644 |
--- a/views/widget/root_view.cc |
+++ b/views/widget/root_view.cc |
@@ -22,6 +22,7 @@ |
#if defined(OS_LINUX) |
#include "views/widget/widget_gtk.h" |
+#include "views/controls/textfield/native_textfield_view.h" |
#endif // defined(OS_LINUX) |
namespace views { |
@@ -617,11 +618,13 @@ View* RootView::GetFocusedView() { |
View* view = focus_manager->GetFocusedView(); |
if (view && (view->GetRootView() == this)) |
return view; |
-#if defined(TOUCH_UI) |
- // hack to deal with two root views in touch |
- // should be fixed by eliminating one of them |
- if (view) |
+ |
+#if defined(OS_LINUX) |
rjkroege
2010/12/15 21:23:31
probably should stay TOUCH_UI? IMO, TOUCH_UI can
oshima
2010/12/16 01:15:19
This is necessary for NativeTextfieldView to work
|
+ if (view && NativeTextfieldView::IsTextfieldViewEnabled()) { |
+ // hack to deal with two root views. |
+ // should be fixed by eliminating one of them |
return view; |
+ } |
#endif |
return NULL; |
} |