Commit e2b3a7f4 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

quartz: Improve video window sizing on first sample.

Preserve sizes set by the application and defer erasing as it is not needed and can cause deadlock between threads with child video windows.
parent f138a572
...@@ -298,23 +298,36 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, ...@@ -298,23 +298,36 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
if (!This->init) if (!This->init)
{ {
DWORD style = GetWindowLongW(This->hWnd, GWL_STYLE); if (!This->WindowPos.right || !This->WindowPos.top)
DWORD style_ex = GetWindowLongW(This->hWnd, GWL_EXSTYLE); {
DWORD style = GetWindowLongW(This->hWnd, GWL_STYLE);
if (!This->WindowPos.right || !This->WindowPos.bottom) DWORD style_ex = GetWindowLongW(This->hWnd, GWL_EXSTYLE);
This->WindowPos = This->SourceRect;
if (!This->WindowPos.right)
AdjustWindowRectEx(&This->WindowPos, style, TRUE, style_ex); {
This->WindowPos.left = This->SourceRect.left;
TRACE("WindowPos: %d %d %d %d\n", This->WindowPos.left, This->WindowPos.top, This->WindowPos.right, This->WindowPos.bottom); This->WindowPos.right = This->SourceRect.right;
SetWindowPos(This->hWnd, NULL, }
This->WindowPos.left, if (!This->WindowPos.bottom)
This->WindowPos.top, {
This->WindowPos.right - This->WindowPos.left, This->WindowPos.top = This->SourceRect.top;
This->WindowPos.bottom - This->WindowPos.top, This->WindowPos.bottom = This->SourceRect.bottom;
SWP_NOZORDER|SWP_NOMOVE); }
GetClientRect(This->hWnd, &This->DestRect); AdjustWindowRectEx(&This->WindowPos, style, TRUE, style_ex);
TRACE("WindowPos: %d %d %d %d\n", This->WindowPos.left, This->WindowPos.top, This->WindowPos.right, This->WindowPos.bottom);
SetWindowPos(This->hWnd, NULL,
This->WindowPos.left,
This->WindowPos.top,
This->WindowPos.right - This->WindowPos.left,
This->WindowPos.bottom - This->WindowPos.top,
SWP_NOZORDER|SWP_NOMOVE|SWP_DEFERERASE);
GetClientRect(This->hWnd, &This->DestRect);
}
else
This->DestRect = This->WindowPos;
This->init = TRUE; This->init = TRUE;
} }
......
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