Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plug-ins/screenshot/screenshot-win32.c | 20 +++++++-------------
- 1 file changed, 7 insertions(+), 13 deletions(-)
- diff --git a/plug-ins/screenshot/screenshot-win32.c b/plug-ins/screenshot/screenshot-win32.c
- index 277f9a5..1545bac 100644
- --- a/plug-ins/screenshot/screenshot-win32.c
- +++ b/plug-ins/screenshot/screenshot-win32.c
- @@ -405,9 +405,11 @@ primDoWindowCapture (HDC hdcWindow,
- /* Copy the data from the application to the bitmap. Even if we did
- * round up the width, BitBlt only the actual data.
- */
- - if (!BitBlt(hdcCompat, 0,0,
- + printf("left: %d top: %d right: %d bottom: %d width: %d height: %d\n", rect.left, rect.top, rect.right, rect.bottom, width, height);
- +
- + if (!BitBlt(hdcCompat,0, 0,
- width, height,
- - hdcWindow, 0,0,
- + hdcWindow, rect.left, rect.top,
- SRCCOPY))
- {
- formatWindowsError (buffer, sizeof buffer);
- @@ -456,26 +458,18 @@ doCapture (HWND selectedHwnd)
- /* Build a region for the capture */
- GetWindowRect (selectedHwnd, &rect);
- - capRegion = CreateRectRgn (rect.left, rect.top,
- - rect.right, rect.bottom);
- - if (!capRegion)
- - {
- - formatWindowsError (buffer, sizeof buffer);
- - g_error ("Error creating region: %s", buffer);
- - return FALSE;
- - }
- /* Get the device context for the selected
- * window. Create a memory DC to use for the
- * Bit copy.
- */
- - hdcSrc = GetDCEx (selectedHwnd, capRegion,
- - DCX_WINDOW | DCX_PARENTCLIP | DCX_INTERSECTRGN);
- + hdcSrc = CreateDC (TEXT("DISPLAY"), NULL, NULL, NULL);
- +
- }
- else
- {
- /* Get the device context for the whole screen */
- - hdcSrc = CreateDC ("DISPLAY", NULL, NULL, NULL);
- + hdcSrc = CreateDC (TEXT("DISPLAY"), NULL, NULL, NULL);
- /* Get the screen's rectangle */
- rect.top = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement