Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(933)

Unified Diff: views/widget/root_view.cc

Issue 200035: First cut at implementation of FindBar for views / gtk... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: views/widget/root_view.cc
===================================================================
--- views/widget/root_view.cc (revision 25765)
+++ views/widget/root_view.cc (working copy)
@@ -360,11 +360,12 @@
if (focus_on_mouse_pressed_) {
#if defined(OS_WIN)
HWND hwnd = GetWidget()->GetNativeView();
- if (::GetFocus() != hwnd) {
+ if (::GetFocus() != hwnd)
::SetFocus(hwnd);
- }
#else
- NOTIMPLEMENTED();
+ GtkWidget* widget = GetWidget()->GetNativeView();
+ if (!gtk_widget_is_focus(widget))
+ gtk_widget_grab_focus(widget);
#endif
}
@@ -782,7 +783,6 @@
v->ShowContextMenu(screen_loc.x(), screen_loc.y(), false);
return true;
}
-
for (; v && v != this && !consumed; v = v->GetParent()) {
consumed = (event.GetType() == Event::ET_KEY_PRESSED) ?
v->OnKeyPressed(event) : v->OnKeyReleased(event);

Powered by Google App Engine
This is Rietveld 408576698