http://bugs.winehq.org/show_bug.cgi?id=26747
--- Comment #8 from ray@pobox.co.uk 2011-04-14 03:04:39 CDT --- (In reply to comment #3)
The point was that it doesn't match the dimensions of the window.
Thank you for correcting the bug status and also thank you for the test program. I have been trying to think of a simple way to show this issue, thus far I have come up with the following.
I have uploaded two screen images, the one generated by SIV which is all offset by one pixel relative to the Wine Screenshot. The actual code that SIV uses to copy the window to the clipboard is below.
As it's only off-by-one pixel it's quite hard to see, but the SIV-Copy image is all offset to the right by one pixel.
I released SIV 4.18 today which can be used to reproduce the screen images.
Is this enough to progress the issue?
The SIV-Copy image is also missing the border which I expect is a side effect of using the Linux window manager. I am wondering if there is a known work-a-round.
if( ( GetWindowRect( whl, wr ) ) && ( GetClientRect( whl, cr ) ) ) /* window size */ { LONG xsiz; LONG ysiz;
UpdateWindow( whl );
hdcw = GetDC( whl ); hdcb = CreateCompatibleDC( hdcw );
if( hbit = CreateCompatibleBitmap( hdcw, /* create bitmap */ xsiz = wr->right - wr->left, ysiz = wr->bottom - wr->top ) ) { SelectObject( hdcb, hbit );
AdjustWindowRect( cr, style, FALSE ); // border information
BitBlt( hdcb, /* dest'n DC */ 0, /* dest'n X pos */ 0, /* dest'n Y pos */ xsiz, /* dest'n Width */ ysiz, /* dest'n Height */ hdcw, /* source DC */ cr->left, /* source X pos */ cr->top, /* source Y pos */ SRCCOPY ); /* operation mode */
SetClipboardData( CF_BITMAP, hbit ); /* set the data */ }
DeleteDC( hdcb ); ReleaseDC( whl, hdcw ); }