Module: wine Branch: master Commit: 0cc78d97c15eb26c791c990f7e27dbe679989c32 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0cc78d97c15eb26c791c990f7e...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Feb 11 17:49:22 2013 +0100
user32: Don't paint to the surface if the window has a pixel format, regardless of the state of the top parent.
---
dlls/user32/painting.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index a6fb23f..ee84689 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -113,6 +113,7 @@ static void update_visible_region( struct dce *dce ) HRGN vis_rgn = 0; HWND top_win = 0; DWORD flags = dce->flags; + DWORD paint_flags = 0; size_t size = 256; RECT win_rect, top_rect; WND *win; @@ -149,6 +150,7 @@ static void update_visible_region( struct dce *dce ) top_rect.top = reply->top_rect.top; top_rect.right = reply->top_rect.right; top_rect.bottom = reply->top_rect.bottom; + paint_flags = reply->paint_flags; } else size = reply->total_size; } @@ -163,12 +165,16 @@ static void update_visible_region( struct dce *dce ) if (dce->clip_rgn) CombineRgn( vis_rgn, vis_rgn, dce->clip_rgn, (flags & DCX_INTERSECTRGN) ? RGN_AND : RGN_DIFF );
- if ((win = WIN_GetPtr( top_win )) && win != WND_DESKTOP && win != WND_OTHER_PROCESS) + /* don't use a surface to paint the client area of OpenGL windows */ + if (!(paint_flags & SET_WINPOS_PIXEL_FORMAT) || (flags & DCX_WINDOW)) { - /* don't use a surface to paint the client area of OpenGL windows */ - if (!win->pixel_format || (flags & DCX_WINDOW)) surface = win->surface; - if (surface) window_surface_add_ref( surface ); - WIN_ReleasePtr( win ); + win = WIN_GetPtr( top_win ); + if (win && win != WND_DESKTOP && win != WND_OTHER_PROCESS) + { + surface = win->surface; + if (surface) window_surface_add_ref( surface ); + WIN_ReleasePtr( win ); + } }
if (!surface) top_rect = get_virtual_screen_rect();