Commit 6acd40dc authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed X11DRV_GetDC for the desktop window.

Use the client window as drawable when possible.
parent 3365eb7a
......@@ -400,6 +400,8 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
if (flags & DCX_PARENTCLIP) flags &= ~DCX_CLIPSIBLINGS;
top = GetAncestor( hwnd, GA_ROOT );
if (!top) top = GetDesktopWindow();
if (top != hwnd)
{
escape.org.x = escape.org.y = 0;
......@@ -422,21 +424,21 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
escape.org.y = 0;
escape.drawable_org = escape.org;
}
else
else if (flags & DCX_WINDOW)
{
escape.drawable = data->whole_window;
escape.drawable_org.x = data->whole_rect.left;
escape.drawable_org.y = data->whole_rect.top;
if (flags & DCX_WINDOW)
{
escape.org.x = win->rectWindow.left - data->whole_rect.left;
escape.org.y = win->rectWindow.top - data->whole_rect.top;
}
else
{
escape.org.x = win->rectClient.left - data->whole_rect.left;
escape.org.y = win->rectClient.top - data->whole_rect.top;
}
escape.drawable = data->client_window;
escape.drawable_org.x = win->rectClient.left;
escape.drawable_org.y = win->rectClient.top;
escape.org.x = 0;
escape.org.y = 0;
}
}
......
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