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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 8931022: NativeWidgetAura::ClearNativeFocus fix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reenable PopupAccelerators test Created 9 years 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
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 931eca58a7996542bf207adca9baddc4161af030..7d5629a519f0b6593279f26618810a7ef8c56a7f 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -528,8 +528,10 @@ void NativeWidgetAura::SetCursor(gfx::NativeCursor cursor) {
}
void NativeWidgetAura::ClearNativeFocus() {
- if (window_ && window_->GetFocusManager())
+ if (window_ && window_->GetFocusManager() &&
+ window_->Contains(window_->GetFocusManager()->GetFocusedWindow())) {
window_->GetFocusManager()->SetFocusedWindow(window_);
+ }
}
void NativeWidgetAura::FocusNativeView(gfx::NativeView native_view) {
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698