Commit 0cc78d97 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Don't paint to the surface if the window has a pixel format, regardless…

user32: Don't paint to the surface if the window has a pixel format, regardless of the state of the top parent.
parent bc602c30
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment