Fix WebRTC window-capture to check for maximized state correctly.

The SW_SHOWXXX values are not bitfields, so using "&" is incorrect.

BUG=none
TEST=Verify that Chrome's WebRTC window-capture feature can capture an unoccluded, non-maximized window correctly under Windows 8 or above.
R=wez@chromium.org

Review URL: https://codereview.webrtc.org/1180673009

Cr-Commit-Position: refs/heads/master@{#9421}
This commit is contained in:
Peter Kasting 2015-06-11 15:42:58 -07:00
parent 728d9037c0
commit 7faba36f79

View File

@ -29,7 +29,7 @@ GetCroppedWindowRect(HWND window,
*original_rect = DesktopRect::MakeLTRB( *original_rect = DesktopRect::MakeLTRB(
rect.left, rect.top, rect.right, rect.bottom); rect.left, rect.top, rect.right, rect.bottom);
if (window_placement.showCmd & SW_SHOWMAXIMIZED) { if (window_placement.showCmd == SW_SHOWMAXIMIZED) {
DesktopSize border = DesktopSize(GetSystemMetrics(SM_CXSIZEFRAME), DesktopSize border = DesktopSize(GetSystemMetrics(SM_CXSIZEFRAME),
GetSystemMetrics(SM_CYSIZEFRAME)); GetSystemMetrics(SM_CYSIZEFRAME));
*cropped_rect = DesktopRect::MakeLTRB( *cropped_rect = DesktopRect::MakeLTRB(