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

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

Issue 8892025: Reland r113741: Move {Restore,Store}FocusedView to NativeWidgetAura::On{Activated,LostActive} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « ui/views/widget/native_widget_aura.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/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index b186728d9a2d024897c1bf6a2f88b8b6ecdbc0da..42f704c0cb71b325cb12565c19803cc4df0170ea 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -365,7 +365,6 @@ void Widget::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
if (!is_add) {
if (child == dragged_view_)
dragged_view_ = NULL;
-
FocusManager* focus_manager = GetFocusManager();
if (focus_manager)
focus_manager->ViewRemoved(child);
@@ -895,6 +894,10 @@ void Widget::OnNativeWidgetCreated() {
}
void Widget::OnNativeWidgetDestroying() {
+ // Tell the focus manager (if any) that root_view is being removed
+ // in case that the focused view is under this root view.
+ if (GetFocusManager())
+ GetFocusManager()->ViewRemoved(root_view_.get());
FOR_EACH_OBSERVER(Observer, observers_, OnWidgetClosing(this));
if (non_client_view_)
non_client_view_->WindowClosing();
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698