Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 } | 22 } |
| 23 WINDOWPLACEMENT window_placement; | 23 WINDOWPLACEMENT window_placement; |
| 24 window_placement.length = sizeof(window_placement); | 24 window_placement.length = sizeof(window_placement); |
| 25 if (!GetWindowPlacement(window, &window_placement)) { | 25 if (!GetWindowPlacement(window, &window_placement)) { |
| 26 return false; | 26 return false; |
| 27 } | 27 } |
| 28 | 28 |
| 29 *original_rect = DesktopRect::MakeLTRB( | 29 *original_rect = DesktopRect::MakeLTRB( |
| 30 rect.left, rect.top, rect.right, rect.bottom); | 30 rect.left, rect.top, rect.right, rect.bottom); |
| 31 | 31 |
| 32 if (window_placement.showCmd & SW_SHOWMAXIMIZED) { | 32 if (window_placement.showCmd == SW_SHOWMAXIMIZED) { |
|
Wez
2015/06/10 17:39:31
This changes behaviour in the case of showCmd=SW_S
Peter Kasting
2015/06/11 04:31:41
Right, I goofed up in my mental arithmetic thinkin
Wez
2015/06/11 17:00:48
Ugh... seems a waste to break this out to a separa
| |
| 33 DesktopSize border = DesktopSize(GetSystemMetrics(SM_CXSIZEFRAME), | 33 DesktopSize border = DesktopSize(GetSystemMetrics(SM_CXSIZEFRAME), |
| 34 GetSystemMetrics(SM_CYSIZEFRAME)); | 34 GetSystemMetrics(SM_CYSIZEFRAME)); |
| 35 *cropped_rect = DesktopRect::MakeLTRB( | 35 *cropped_rect = DesktopRect::MakeLTRB( |
| 36 rect.left + border.width(), | 36 rect.left + border.width(), |
| 37 rect.top, | 37 rect.top, |
| 38 rect.right - border.width(), | 38 rect.right - border.width(), |
| 39 rect.bottom - border.height()); | 39 rect.bottom - border.height()); |
| 40 } else { | 40 } else { |
| 41 *cropped_rect = *original_rect; | 41 *cropped_rect = *original_rect; |
| 42 } | 42 } |
| 43 return true; | 43 return true; |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace webrtc | 46 } // namespace webrtc |
| OLD | NEW |