OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/window/window_win.h" | 5 #include "views/window/window_win.h" |
6 | 6 |
7 #include <shellapi.h> | 7 #include <shellapi.h> |
8 | 8 |
9 #include "app/gfx/canvas.h" | 9 #include "app/gfx/canvas.h" |
10 #include "app/gfx/font.h" | 10 #include "app/gfx/font.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 } | 184 } |
185 | 185 |
186 namespace { | 186 namespace { |
187 static BOOL CALLBACK SendDwmCompositionChanged(HWND window, LPARAM param) { | 187 static BOOL CALLBACK SendDwmCompositionChanged(HWND window, LPARAM param) { |
188 SendMessage(window, WM_DWMCOMPOSITIONCHANGED, 0, 0); | 188 SendMessage(window, WM_DWMCOMPOSITIONCHANGED, 0, 0); |
189 return TRUE; | 189 return TRUE; |
190 } | 190 } |
191 } // namespace | 191 } // namespace |
192 | 192 |
193 void WindowWin::FrameTypeChanged() { | 193 void WindowWin::FrameTypeChanged() { |
| 194 // If we're not on Aero Glass, we don't care doing any of the DWM stuff. Just |
| 195 // tell the NCV to update and leave it there. |
| 196 if (!win_util::ShouldUseVistaFrame()) { |
| 197 non_client_view_->UpdateFrame(); |
| 198 return; |
| 199 } |
| 200 |
194 // The window may try to paint in SetUseNativeFrame, and as a result it can | 201 // The window may try to paint in SetUseNativeFrame, and as a result it can |
195 // get into a state where it is very unhappy with itself - rendering black | 202 // get into a state where it is very unhappy with itself - rendering black |
196 // behind the entire client area. This is because for some reason the | 203 // behind the entire client area. This is because for some reason the |
197 // SkPorterDuff::kClear_mode erase done in the RootView thinks the window is | 204 // SkPorterDuff::kClear_mode erase done in the RootView thinks the window is |
198 // still opaque. So, to work around this we hide the window as soon as we can | 205 // still opaque. So, to work around this we hide the window as soon as we can |
199 // (now), saving off its placement so it can be properly restored once | 206 // (now), saving off its placement so it can be properly restored once |
200 // everything has settled down. | 207 // everything has settled down. |
201 WINDOWPLACEMENT saved_window_placement; | 208 WINDOWPLACEMENT saved_window_placement; |
202 saved_window_placement.length = sizeof(WINDOWPLACEMENT); | 209 saved_window_placement.length = sizeof(WINDOWPLACEMENT); |
203 GetWindowPlacement(GetNativeView(), &saved_window_placement); | 210 GetWindowPlacement(GetNativeView(), &saved_window_placement); |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 } | 1390 } |
1384 return TRUE; | 1391 return TRUE; |
1385 } | 1392 } |
1386 } // namespace | 1393 } // namespace |
1387 | 1394 |
1388 void Window::CloseAllSecondaryWindows() { | 1395 void Window::CloseAllSecondaryWindows() { |
1389 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); | 1396 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); |
1390 } | 1397 } |
1391 | 1398 |
1392 } // namespace views | 1399 } // namespace views |
OLD | NEW |