| 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 <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "app/gfx/canvas_paint.h" | 10 #include "app/gfx/canvas_paint.h" |
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 MONITORINFO mi; | 1348 MONITORINFO mi; |
| 1349 mi.cbSize = sizeof mi; | 1349 mi.cbSize = sizeof mi; |
| 1350 GetMonitorInfo(monitor, &mi); | 1350 GetMonitorInfo(monitor, &mi); |
| 1351 CRect work_rect = mi.rcWork; | 1351 CRect work_rect = mi.rcWork; |
| 1352 work_rect.OffsetRect(-window_rect.left, -window_rect.top); | 1352 work_rect.OffsetRect(-window_rect.left, -window_rect.top); |
| 1353 new_region = CreateRectRgnIndirect(&work_rect); | 1353 new_region = CreateRectRgnIndirect(&work_rect); |
| 1354 } else { | 1354 } else { |
| 1355 gfx::Path window_mask; | 1355 gfx::Path window_mask; |
| 1356 non_client_view_->GetWindowMask( | 1356 non_client_view_->GetWindowMask( |
| 1357 gfx::Size(window_rect.Width(), window_rect.Height()), &window_mask); | 1357 gfx::Size(window_rect.Width(), window_rect.Height()), &window_mask); |
| 1358 new_region = window_mask.CreateHRGN(); | 1358 new_region = window_mask.CreateNativeRegion(); |
| 1359 } | 1359 } |
| 1360 | 1360 |
| 1361 if (current_rgn_result == ERROR || !EqualRgn(current_rgn, new_region)) { | 1361 if (current_rgn_result == ERROR || !EqualRgn(current_rgn, new_region)) { |
| 1362 // SetWindowRgn takes ownership of the HRGN created by CreateHRGN. | 1362 // SetWindowRgn takes ownership of the HRGN created by CreateNativeRegion. |
| 1363 SetWindowRgn(new_region, TRUE); | 1363 SetWindowRgn(new_region, TRUE); |
| 1364 } else { | 1364 } else { |
| 1365 DeleteObject(new_region); | 1365 DeleteObject(new_region); |
| 1366 } | 1366 } |
| 1367 | 1367 |
| 1368 DeleteObject(current_rgn); | 1368 DeleteObject(current_rgn); |
| 1369 } | 1369 } |
| 1370 | 1370 |
| 1371 void WindowWin::ProcessNCMousePress(const CPoint& point, int flags) { | 1371 void WindowWin::ProcessNCMousePress(const CPoint& point, int flags) { |
| 1372 CPoint temp = point; | 1372 CPoint temp = point; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 Window::CloseSecondaryWidget(root_view->GetWidget()); | 1435 Window::CloseSecondaryWidget(root_view->GetWidget()); |
| 1436 return TRUE; | 1436 return TRUE; |
| 1437 } | 1437 } |
| 1438 } // namespace | 1438 } // namespace |
| 1439 | 1439 |
| 1440 void Window::CloseAllSecondaryWindows() { | 1440 void Window::CloseAllSecondaryWindows() { |
| 1441 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); | 1441 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); |
| 1442 } | 1442 } |
| 1443 | 1443 |
| 1444 } // namespace views | 1444 } // namespace views |
| OLD | NEW |