From: He Yang <1160386...@qq.com> the region window created by option `-show_region`, though only 3 pixel width, is not click-throughable.
Signed-off-by: He Yang <1160386...@qq.com> --- libavdevice/gdigrab.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c index 9b2c55fe90..e9d646999f 100644 --- a/libavdevice/gdigrab.c +++ b/libavdevice/gdigrab.c @@ -126,7 +126,7 @@ gdigrab_region_wnd_init(AVFormatContext *s1, struct gdigrab *gdigrab) HRGN region_interior = NULL; DWORD style = WS_POPUP | WS_VISIBLE; - DWORD ex = WS_EX_TOOLWINDOW | WS_EX_TOPMOST | WS_EX_TRANSPARENT; + DWORD ex = WS_EX_TOOLWINDOW | WS_EX_TOPMOST | WS_EX_LAYERED | WS_EX_TRANSPARENT; rect.left -= REGION_WND_BORDER; rect.top -= REGION_WND_BORDER; rect.right += REGION_WND_BORDER; rect.bottom += REGION_WND_BORDER; @@ -143,6 +143,9 @@ gdigrab_region_wnd_init(AVFormatContext *s1, struct gdigrab *gdigrab) goto error; } + // Set the window transparency to 255 (opaque) + SetLayeredWindowAttributes(hwnd, 0, 255, LWA_ALPHA); + // Set the window shape to only include the border area GetClientRect(hwnd, &rect); region = CreateRectRgn(0, 0, -- 2.30.0.windows.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".