diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-24 23:08:29 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-24 23:08:29 +0000 |
commit | c4ebacb170b985e0bf0441d27e3b6dae1689ef73 (patch) | |
tree | edb88e6e89540ee959d1455d371ee2e4460ab3a6 /views | |
parent | 2b1199b5862e89cbf8004c493bff80f5293848f8 (diff) | |
download | chromium_src-c4ebacb170b985e0bf0441d27e3b6dae1689ef73.zip chromium_src-c4ebacb170b985e0bf0441d27e3b6dae1689ef73.tar.gz chromium_src-c4ebacb170b985e0bf0441d27e3b6dae1689ef73.tar.bz2 |
Theme reset fixes.
BUG=16669
TEST=Make sure that resetting your theme to the default on Aero Glass causes you to see a black frame.
Review URL: http://codereview.chromium.org/159332
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21590 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/window/window_win.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/views/window/window_win.cc b/views/window/window_win.cc index 13f0529..ee07778 100644 --- a/views/window/window_win.cc +++ b/views/window/window_win.cc @@ -190,6 +190,10 @@ static BOOL CALLBACK SendDwmCompositionChanged(HWND window, LPARAM param) { } // namespace void WindowWin::FrameTypeChanged() { + WINDOWPLACEMENT wp = {0}; + GetWindowPlacement(GetNativeWindow(), &wp); + Hide(); + // Update the non-client view with the correct frame view for the active frame // type. non_client_view_->UpdateFrame(); @@ -217,6 +221,7 @@ void WindowWin::FrameTypeChanged() { // to notify our children too, since we can have MDI child windows who need to // update their appearance. EnumChildWindows(GetNativeView(), &SendDwmCompositionChanged, NULL); + SetWindowPlacement(GetNativeWindow(), &wp); } //////////////////////////////////////////////////////////////////////////////// @@ -590,11 +595,7 @@ LRESULT WindowWin::OnDwmCompositionChanged(UINT msg, WPARAM w_param, // something skia-ey. // Frame type toggling caused by the user (e.g. switching theme) doesn't seem // to have this requirement. - WINDOWPLACEMENT wp = {0}; - GetWindowPlacement(GetNativeWindow(), &wp); - Hide(); FrameTypeChanged(); - SetWindowPlacement(GetNativeWindow(), &wp); return 0; } |