Fix 'Image will be cropped if WindowCapturerWinGdi used'
Bug: webrtc:15719 Change-Id: I7daf8ee5b90fbe9f1246f1d99211ffa0d8a19f73 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330780 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/main@{#41503}
This commit is contained in:
parent
bb0044eb90
commit
844225a76a
1
AUTHORS
1
AUTHORS
@ -120,6 +120,7 @@ Silviu Caragea <silviu.cpp@gmail.com>
|
||||
Stefan Gula <steweg@gmail.com>
|
||||
Stephan Hartmann <stha09@googlemail.com>
|
||||
Steve Reid <sreid@sea-to-sky.net>
|
||||
Tao chen <meemetao@gmail.com>
|
||||
Takaaki Suzuki <takaakisuzuki.14@gmail.com>
|
||||
Tarun Chawla <trnkumarchawla@gmail.com>
|
||||
Todd Wong <todd.wong.ndq@gmail.com>
|
||||
|
||||
@ -183,6 +183,13 @@ bool GetCroppedWindowRect(HWND window,
|
||||
is_maximized) {
|
||||
// Only apply this cropping to windows with a resize border (otherwise,
|
||||
// it'd clip the edges of captured pop-up windows without this border).
|
||||
RECT rect;
|
||||
DwmGetWindowAttribute(window, DWMWA_EXTENDED_FRAME_BOUNDS, &rect,
|
||||
sizeof(RECT));
|
||||
// it's means that the window edge is not transparent
|
||||
if (rect.left == original_rect->left()) {
|
||||
return true;
|
||||
}
|
||||
LONG style = GetWindowLong(window, GWL_STYLE);
|
||||
if (style & WS_THICKFRAME || style & DS_MODALFRAME) {
|
||||
int width = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user