Commit 041c489a authored by Alexandre Julliard's avatar Alexandre Julliard

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

instead of the parent to avoid trouble with OpenGL clipping.
parent d149d3cf
......@@ -416,19 +416,24 @@ 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 );
escape.drawable_org.x = escape.drawable_org.y = 0;
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 );
}
}
else
{
if (IsIconic( hwnd ))
{
escape.drawable = data->icon_window ? data->icon_window : data->whole_window;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment