Fixed X11DRV_GetDC for the desktop window.
Use the client window as drawable when possible.
This commit is contained in:
parent
3365eb7a2d
commit
6acd40dc98
@ -400,6 +400,8 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
|
|||||||
if (flags & DCX_PARENTCLIP) flags &= ~DCX_CLIPSIBLINGS;
|
if (flags & DCX_PARENTCLIP) flags &= ~DCX_CLIPSIBLINGS;
|
||||||
|
|
||||||
top = GetAncestor( hwnd, GA_ROOT );
|
top = GetAncestor( hwnd, GA_ROOT );
|
||||||
|
if (!top) top = GetDesktopWindow();
|
||||||
|
|
||||||
if (top != hwnd)
|
if (top != hwnd)
|
||||||
{
|
{
|
||||||
escape.org.x = escape.org.y = 0;
|
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.org.y = 0;
|
||||||
escape.drawable_org = escape.org;
|
escape.drawable_org = escape.org;
|
||||||
}
|
}
|
||||||
else
|
else if (flags & DCX_WINDOW)
|
||||||
{
|
{
|
||||||
escape.drawable = data->whole_window;
|
escape.drawable = data->whole_window;
|
||||||
escape.drawable_org.x = data->whole_rect.left;
|
escape.drawable_org.x = data->whole_rect.left;
|
||||||
escape.drawable_org.y = data->whole_rect.top;
|
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;
|
||||||
escape.org.x = win->rectWindow.left - data->whole_rect.left;
|
}
|
||||||
escape.org.y = win->rectWindow.top - data->whole_rect.top;
|
else
|
||||||
}
|
{
|
||||||
else
|
escape.drawable = data->client_window;
|
||||||
{
|
escape.drawable_org.x = win->rectClient.left;
|
||||||
escape.org.x = win->rectClient.left - data->whole_rect.left;
|
escape.drawable_org.y = win->rectClient.top;
|
||||||
escape.org.y = win->rectClient.top - data->whole_rect.top;
|
escape.org.x = 0;
|
||||||
}
|
escape.org.y = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user