| 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 "chrome/views/window/window_win.h" | 5 #include "chrome/views/window/window_win.h" |
| 6 | 6 |
| 7 #include <shellapi.h> | 7 #include <shellapi.h> |
| 8 | 8 |
| 9 #include "base/win_util.h" | 9 #include "base/win_util.h" |
| 10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 // subtracting the border Windows automatically adds for maximized mode. | 620 // subtracting the border Windows automatically adds for maximized mode. |
| 621 int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); | 621 int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME); |
| 622 InflateRect(client_rect, -border_thickness, -border_thickness); | 622 InflateRect(client_rect, -border_thickness, -border_thickness); |
| 623 | 623 |
| 624 // Find all auto-hide taskbars along the screen edges and adjust in by the | 624 // Find all auto-hide taskbars along the screen edges and adjust in by the |
| 625 // thickness of the auto-hide taskbar on each such edge, so the window isn't | 625 // thickness of the auto-hide taskbar on each such edge, so the window isn't |
| 626 // treated as a "fullscreen app", which would cause the taskbars to | 626 // treated as a "fullscreen app", which would cause the taskbars to |
| 627 // disappear. | 627 // disappear. |
| 628 HMONITOR monitor = MonitorFromWindow(GetNativeView(), | 628 HMONITOR monitor = MonitorFromWindow(GetNativeView(), |
| 629 MONITOR_DEFAULTTONEAREST); | 629 MONITOR_DEFAULTTONEAREST); |
| 630 if (win_util::EdgeHasAutoHideTaskbar(ABE_LEFT, monitor)) | 630 if (win_util::EdgeHasTopmostAutoHideTaskbar(ABE_LEFT, monitor)) |
| 631 client_rect->left += win_util::kAutoHideTaskbarThicknessPx; | 631 client_rect->left += win_util::kAutoHideTaskbarThicknessPx; |
| 632 if (win_util::EdgeHasAutoHideTaskbar(ABE_TOP, monitor)) | 632 if (win_util::EdgeHasTopmostAutoHideTaskbar(ABE_TOP, monitor)) |
| 633 client_rect->top += win_util::kAutoHideTaskbarThicknessPx; | 633 client_rect->top += win_util::kAutoHideTaskbarThicknessPx; |
| 634 if (win_util::EdgeHasAutoHideTaskbar(ABE_RIGHT, monitor)) | 634 if (win_util::EdgeHasTopmostAutoHideTaskbar(ABE_RIGHT, monitor)) |
| 635 client_rect->right -= win_util::kAutoHideTaskbarThicknessPx; | 635 client_rect->right -= win_util::kAutoHideTaskbarThicknessPx; |
| 636 if (win_util::EdgeHasAutoHideTaskbar(ABE_BOTTOM, monitor)) | 636 if (win_util::EdgeHasTopmostAutoHideTaskbar(ABE_BOTTOM, monitor)) |
| 637 client_rect->bottom -= win_util::kAutoHideTaskbarThicknessPx; | 637 client_rect->bottom -= win_util::kAutoHideTaskbarThicknessPx; |
| 638 | 638 |
| 639 // We cannot return WVR_REDRAW when there is nonclient area, or Windows | 639 // We cannot return WVR_REDRAW when there is nonclient area, or Windows |
| 640 // exhibits bugs where client pixels and child HWNDs are mispositioned by | 640 // exhibits bugs where client pixels and child HWNDs are mispositioned by |
| 641 // the width/height of the upper-left nonclient area. | 641 // the width/height of the upper-left nonclient area. |
| 642 return 0; | 642 return 0; |
| 643 } | 643 } |
| 644 | 644 |
| 645 // If the window bounds change, we're going to relayout and repaint anyway. | 645 // If the window bounds change, we're going to relayout and repaint anyway. |
| 646 // Returning WVR_REDRAW avoids an extra paint before that of the old client | 646 // Returning WVR_REDRAW avoids an extra paint before that of the old client |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 resize_cursors_[RC_NORMAL] = LoadCursor(NULL, IDC_ARROW); | 1229 resize_cursors_[RC_NORMAL] = LoadCursor(NULL, IDC_ARROW); |
| 1230 resize_cursors_[RC_VERTICAL] = LoadCursor(NULL, IDC_SIZENS); | 1230 resize_cursors_[RC_VERTICAL] = LoadCursor(NULL, IDC_SIZENS); |
| 1231 resize_cursors_[RC_HORIZONTAL] = LoadCursor(NULL, IDC_SIZEWE); | 1231 resize_cursors_[RC_HORIZONTAL] = LoadCursor(NULL, IDC_SIZEWE); |
| 1232 resize_cursors_[RC_NESW] = LoadCursor(NULL, IDC_SIZENESW); | 1232 resize_cursors_[RC_NESW] = LoadCursor(NULL, IDC_SIZENESW); |
| 1233 resize_cursors_[RC_NWSE] = LoadCursor(NULL, IDC_SIZENWSE); | 1233 resize_cursors_[RC_NWSE] = LoadCursor(NULL, IDC_SIZENWSE); |
| 1234 initialized = true; | 1234 initialized = true; |
| 1235 } | 1235 } |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 } // namespace views | 1238 } // namespace views |
| OLD | NEW |