summaryrefslogtreecommitdiffstats
path: root/views/widget/widget_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/widget/widget_win.cc')
-rw-r--r--views/widget/widget_win.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 3d9987c..485f1ae 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -1124,6 +1124,9 @@ void WidgetWin::PostProcessActivateMessage(WidgetWin* widget,
return;
}
if (WA_INACTIVE == activation_state) {
+ // We might get activated/inactivated without being enabled, so we need to
+ // clear restore_focus_when_enabled_.
+ widget->restore_focus_when_enabled_ = false;
widget->focus_manager_->StoreFocusedView();
} else {
// We must restore the focus after the message has been DefProc'ed as it