user32: Don't paint to the surface if the window has a pixel format, regardless of the state of the top parent.

This commit is contained in:
Alexandre Julliard 2013-02-11 17:49:22 +01:00
parent bc602c3060
commit 0cc78d97c1
1 changed files with 11 additions and 5 deletions

View File

@ -113,6 +113,7 @@ static void update_visible_region( struct dce *dce )
HRGN vis_rgn = 0; HRGN vis_rgn = 0;
HWND top_win = 0; HWND top_win = 0;
DWORD flags = dce->flags; DWORD flags = dce->flags;
DWORD paint_flags = 0;
size_t size = 256; size_t size = 256;
RECT win_rect, top_rect; RECT win_rect, top_rect;
WND *win; WND *win;
@ -149,6 +150,7 @@ static void update_visible_region( struct dce *dce )
top_rect.top = reply->top_rect.top; top_rect.top = reply->top_rect.top;
top_rect.right = reply->top_rect.right; top_rect.right = reply->top_rect.right;
top_rect.bottom = reply->top_rect.bottom; top_rect.bottom = reply->top_rect.bottom;
paint_flags = reply->paint_flags;
} }
else size = reply->total_size; else size = reply->total_size;
} }
@ -163,13 +165,17 @@ static void update_visible_region( struct dce *dce )
if (dce->clip_rgn) CombineRgn( vis_rgn, vis_rgn, dce->clip_rgn, if (dce->clip_rgn) CombineRgn( vis_rgn, vis_rgn, dce->clip_rgn,
(flags & DCX_INTERSECTRGN) ? RGN_AND : RGN_DIFF ); (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 */ /* don't use a surface to paint the client area of OpenGL windows */
if (!win->pixel_format || (flags & DCX_WINDOW)) surface = win->surface; if (!(paint_flags & SET_WINPOS_PIXEL_FORMAT) || (flags & DCX_WINDOW))
{
win = WIN_GetPtr( top_win );
if (win && win != WND_DESKTOP && win != WND_OTHER_PROCESS)
{
surface = win->surface;
if (surface) window_surface_add_ref( surface ); if (surface) window_surface_add_ref( surface );
WIN_ReleasePtr( win ); WIN_ReleasePtr( win );
} }
}
if (!surface) top_rect = get_virtual_screen_rect(); if (!surface) top_rect = get_virtual_screen_rect();
__wine_set_visible_region( dce->hdc, vis_rgn, &win_rect, &top_rect, surface ); __wine_set_visible_region( dce->hdc, vis_rgn, &win_rect, &top_rect, surface );