From 044f790bcb46161bc91d16c75e7260d339e0919c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 30 Aug 2012 14:40:31 +0200 Subject: [PATCH] winex11: Always paint to the whole window. --- dlls/winex11.drv/window.c | 14 ++++++-------- server/window.c | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 7e886ddd733..52c18cfb0de 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2218,10 +2218,7 @@ void CDECL X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, { escape.drawable = data->icon_window; } - else if (flags & DCX_WINDOW) - escape.drawable = data ? data->whole_window : X11DRV_get_whole_window( hwnd ); - else - escape.drawable = escape.gl_drawable; + else escape.drawable = data ? data->whole_window : X11DRV_get_whole_window( hwnd ); if (escape.gl_drawable) escape.gl_type = DC_GL_WINDOW; /* special case: when repainting the root window, clip out top-level windows */ @@ -2231,21 +2228,22 @@ void CDECL X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, { /* find the first ancestor that has a drawable */ for (parent = hwnd; parent && parent != top; parent = GetAncestor( parent, GA_PARENT )) - if ((escape.drawable = X11DRV_get_client_window( parent ))) break; + if ((escape.drawable = X11DRV_get_whole_window( parent ))) break; if (escape.drawable) { POINT pt = { 0, 0 }; - MapWindowPoints( top, parent, &pt, 1 ); + MapWindowPoints( 0, parent, &pt, 1 ); + escape.dc_rect = *win_rect; OffsetRect( &escape.dc_rect, pt.x, pt.y ); + if (flags & DCX_CLIPCHILDREN) escape.mode = ClipByChildren; } - else escape.drawable = X11DRV_get_client_window( top ); + else escape.drawable = X11DRV_get_whole_window( top ); escape.fbconfig_id = data ? data->fbconfig_id : (XID)GetPropA( hwnd, fbconfig_id_prop ); escape.gl_drawable = data ? data->gl_drawable : (Drawable)GetPropA( hwnd, gl_drawable_prop ); escape.pixmap = data ? data->pixmap : (Pixmap)GetPropA( hwnd, pixmap_prop ); if (escape.gl_drawable) escape.gl_type = escape.pixmap ? DC_GL_PIXMAP_WIN : DC_GL_CHILD_WIN; - if (flags & DCX_CLIPCHILDREN) escape.mode = ClipByChildren; } ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); diff --git a/server/window.c b/server/window.c index cc4b07b5392..fefe1acd3bc 100644 --- a/server/window.c +++ b/server/window.c @@ -2311,7 +2311,7 @@ DECL_HANDLER(get_visible_region) if (data) set_reply_data_ptr( data, reply->total_size ); } reply->top_win = top->handle; - reply->top_rect = (top == win && (req->flags & DCX_WINDOW)) ? top->visible_rect : top->client_rect; + reply->top_rect = top->visible_rect; if (!is_desktop_window(win)) {