summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 16:58:53 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 16:58:53 +0000
commit46739a21804b7ee71eb8368609e2c3592334bc79 (patch)
treed4e4cc7415b7bde15c9b4141892fae5b347bd6e3 /views
parent7a22201cc3fa0f0dd33504aded3df89b14a14aff (diff)
downloadchromium_src-46739a21804b7ee71eb8368609e2c3592334bc79.zip
chromium_src-46739a21804b7ee71eb8368609e2c3592334bc79.tar.gz
chromium_src-46739a21804b7ee71eb8368609e2c3592334bc79.tar.bz2
In some cases, a WidgetWin can get activated/deactivated
without having been enabled. We were keeping a state in that case that would cause a DCHECK on further activation. BUG=12909 TEST=See bug, open the stack.html file when running Chrome with assertions on. Resize the window, close the dialogs, no assert should happen. Review URL: http://codereview.chromium.org/283003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-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