summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-13 22:58:37 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-13 22:58:37 +0000
commit8be32b8c17f6ba3daf98645e583d00289874c325 (patch)
tree5d5a30e8c137298b7055bab0c81ba7680c820cfb
parent90f3f1028f80d4812ca808bb08df9be45535ed73 (diff)
downloadchromium_src-8be32b8c17f6ba3daf98645e583d00289874c325.zip
chromium_src-8be32b8c17f6ba3daf98645e583d00289874c325.tar.gz
chromium_src-8be32b8c17f6ba3daf98645e583d00289874c325.tar.bz2
Make sure we always hide content_window_ when hiding a DNWA
For certain window types, DNWA's content_window_ wasn't being hidden immediately when DNWA::Close() is called. Instead just the HWND attached to the DRWHWin was being hidden. The side-effect of this was that attached controllers (like FocusController) weren't being told to update their bookkeeping until much later in the destruction process which I think is leading to crashes. This change makes the hiding more like ChromeOS. R=sky@chromium.org http://crbug.com/314118 Review URL: https://codereview.chromium.org/61003008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234941 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/views/widget/desktop_aura/desktop_native_widget_aura.cc5
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.cc2
2 files changed, 5 insertions, 2 deletions
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 8fda010..b0e1016 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -660,8 +660,11 @@ void DesktopNativeWidgetAura::SetShape(gfx::NativeRegion shape) {
void DesktopNativeWidgetAura::Close() {
if (!content_window_)
return;
- desktop_root_window_host_->Close();
+
content_window_->SuppressPaint();
+ content_window_->Hide();
+
+ desktop_root_window_host_->Close();
}
void DesktopNativeWidgetAura::CloseNow() {
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
index a07007e..527a9ca 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
@@ -157,9 +157,9 @@ DesktopRootWindowHostWin::CreateDragDropClient(
}
void DesktopRootWindowHostWin::Close() {
+ // TODO(beng): Move this entire branch to DNWA so it can be shared with X11.
if (should_animate_window_close_) {
pending_close_ = true;
- content_window_->Hide();
const bool is_animating =
content_window_->layer()->GetAnimator()->IsAnimatingProperty(
ui::LayerAnimationElement::VISIBILITY);