quartz: Fix video rendering sizing/positioning bugs.
This commit is contained in:
parent
bf23e5f3f7
commit
fb8df8ea82
|
@ -126,6 +126,20 @@ static LRESULT CALLBACK VideoWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
|
||||||
/* TRACE("WM_SIZING %d %d %d %d\n", lprect->left, lprect->top, lprect->right, lprect->bottom); */
|
/* TRACE("WM_SIZING %d %d %d %d\n", lprect->left, lprect->top, lprect->right, lprect->bottom); */
|
||||||
SetWindowPos(hwnd, NULL, lprect->left, lprect->top, lprect->right - lprect->left, lprect->bottom - lprect->top, SWP_NOZORDER);
|
SetWindowPos(hwnd, NULL, lprect->left, lprect->top, lprect->right - lprect->left, lprect->bottom - lprect->top, SWP_NOZORDER);
|
||||||
GetClientRect(hwnd, &pVideoRenderer->DestRect);
|
GetClientRect(hwnd, &pVideoRenderer->DestRect);
|
||||||
|
TRACE("WM_SIZING: DestRect=(%d,%d),(%d,%d)\n",
|
||||||
|
pVideoRenderer->DestRect.left,
|
||||||
|
pVideoRenderer->DestRect.top,
|
||||||
|
pVideoRenderer->DestRect.right - pVideoRenderer->DestRect.left,
|
||||||
|
pVideoRenderer->DestRect.bottom - pVideoRenderer->DestRect.top);
|
||||||
|
return TRUE;
|
||||||
|
case WM_SIZE:
|
||||||
|
TRACE("WM_SIZE %d %d\n", LOWORD(lParam), HIWORD(lParam));
|
||||||
|
GetClientRect(hwnd, &pVideoRenderer->DestRect);
|
||||||
|
TRACE("WM_SIZING: DestRect=(%d,%d),(%d,%d)\n",
|
||||||
|
pVideoRenderer->DestRect.left,
|
||||||
|
pVideoRenderer->DestRect.top,
|
||||||
|
pVideoRenderer->DestRect.right - pVideoRenderer->DestRect.left,
|
||||||
|
pVideoRenderer->DestRect.bottom - pVideoRenderer->DestRect.top);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return DefWindowProcA(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcA(hwnd, uMsg, wParam, lParam);
|
||||||
|
@ -305,18 +319,14 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
|
||||||
|
|
||||||
if (!This->init)
|
if (!This->init)
|
||||||
{
|
{
|
||||||
/* Compute the size of the whole window so the client area size matches video one */
|
/* Honor previously set WindowPos */
|
||||||
RECT wrect, crect;
|
TRACE("WindowPos: %d %d %d %d\n", This->WindowPos.left, This->WindowPos.top, This->WindowPos.right, This->WindowPos.bottom);
|
||||||
int h, v;
|
SetWindowPos(This->hWnd, NULL,
|
||||||
GetWindowRect(This->hWnd, &wrect);
|
This->WindowPos.left,
|
||||||
GetClientRect(This->hWnd, &crect);
|
This->WindowPos.top,
|
||||||
h = (wrect.right - wrect.left) - (crect.right - crect.left);
|
This->WindowPos.right - This->WindowPos.left,
|
||||||
v = (wrect.bottom - wrect.top) - (crect.bottom - crect.top);
|
This->WindowPos.bottom - This->WindowPos.top,
|
||||||
SetWindowPos(This->hWnd, NULL, 0, 0, width + h +20, height + v+20, SWP_NOZORDER|SWP_NOMOVE);
|
SWP_NOZORDER|SWP_NOMOVE);
|
||||||
This->WindowPos.left = 0;
|
|
||||||
This->WindowPos.top = 0;
|
|
||||||
This->WindowPos.right = width;
|
|
||||||
This->WindowPos.bottom = abs(height);
|
|
||||||
GetClientRect(This->hWnd, &This->DestRect);
|
GetClientRect(This->hWnd, &This->DestRect);
|
||||||
This->init = TRUE;
|
This->init = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue