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:
parent
bc602c3060
commit
0cc78d97c1
|
@ -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,12 +165,16 @@ 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 */
|
||||||
|
if (!(paint_flags & SET_WINPOS_PIXEL_FORMAT) || (flags & DCX_WINDOW))
|
||||||
{
|
{
|
||||||
/* don't use a surface to paint the client area of OpenGL windows */
|
win = WIN_GetPtr( top_win );
|
||||||
if (!win->pixel_format || (flags & DCX_WINDOW)) surface = win->surface;
|
if (win && win != WND_DESKTOP && win != WND_OTHER_PROCESS)
|
||||||
if (surface) window_surface_add_ref( surface );
|
{
|
||||||
WIN_ReleasePtr( win );
|
surface = win->surface;
|
||||||
|
if (surface) window_surface_add_ref( surface );
|
||||||
|
WIN_ReleasePtr( win );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!surface) top_rect = get_virtual_screen_rect();
|
if (!surface) top_rect = get_virtual_screen_rect();
|
||||||
|
|
Loading…
Reference in New Issue