From 041c489a47816e9f56783b6e4f16c480af78df48 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 24 Aug 2004 02:35:25 +0000 Subject: [PATCH] When possible, use the X window of the requested window in GetDC instead of the parent to avoid trouble with OpenGL clipping. --- dlls/x11drv/winpos.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/x11drv/winpos.c b/dlls/x11drv/winpos.c index c156ac5dfd1..d9fbdd3e49d 100644 --- a/dlls/x11drv/winpos.c +++ b/dlls/x11drv/winpos.c @@ -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 {