When possible, use the X window of the requested window in GetDC

instead of the parent to avoid trouble with OpenGL clipping.
This commit is contained in:
Alexandre Julliard 2004-08-24 02:35:25 +00:00
parent d149d3cff3
commit 041c489a47
1 changed files with 10 additions and 5 deletions

View File

@ -416,16 +416,21 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
if (top != hwnd)
{
escape.org.x = escape.org.y = 0;
escape.drawable_org.x = escape.drawable_org.y = 0;
if (flags & DCX_WINDOW)
{
escape.org.x = win->rectWindow.left - win->rectClient.left;
escape.org.y = win->rectWindow.top - win->rectClient.top;
MapWindowPoints( hwnd, top, &escape.org, 1 );
MapWindowPoints( top, 0, &escape.drawable_org, 1 );
escape.drawable = X11DRV_get_client_window( top );
}
else
{
escape.org.x = escape.org.y = 0;
MapWindowPoints( hwnd, 0, &escape.drawable_org, 1 );
escape.drawable = X11DRV_get_client_window( hwnd );
}
MapWindowPoints( hwnd, top, &escape.org, 1 );
escape.drawable_org.x = escape.drawable_org.y = 0;
MapWindowPoints( top, 0, &escape.drawable_org, 1 );
escape.drawable = X11DRV_get_client_window( top );
}
else
{