quartz: Use target rect if set otherwise default to source rect in VideoRenderer_AutoShowWindow.
This commit is contained in:
parent
a89f877fd3
commit
266e79d05f
|
@ -150,7 +150,8 @@ static BOOL CreateRenderingSubsystem(VideoRendererImpl* This)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void VideoRenderer_AutoShowWindow(VideoRendererImpl *This) {
|
static void VideoRenderer_AutoShowWindow(VideoRendererImpl *This)
|
||||||
|
{
|
||||||
if (!This->init && (!This->WindowPos.right || !This->WindowPos.top))
|
if (!This->init && (!This->WindowPos.right || !This->WindowPos.top))
|
||||||
{
|
{
|
||||||
DWORD style = GetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE);
|
DWORD style = GetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE);
|
||||||
|
@ -158,13 +159,29 @@ static void VideoRenderer_AutoShowWindow(VideoRendererImpl *This) {
|
||||||
|
|
||||||
if (!This->WindowPos.right)
|
if (!This->WindowPos.right)
|
||||||
{
|
{
|
||||||
This->WindowPos.left = This->SourceRect.left;
|
if (This->DestRect.right)
|
||||||
This->WindowPos.right = This->SourceRect.right;
|
{
|
||||||
|
This->WindowPos.left = This->DestRect.left;
|
||||||
|
This->WindowPos.right = This->DestRect.right;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
This->WindowPos.left = This->SourceRect.left;
|
||||||
|
This->WindowPos.right = This->SourceRect.right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!This->WindowPos.bottom)
|
if (!This->WindowPos.bottom)
|
||||||
{
|
{
|
||||||
This->WindowPos.top = This->SourceRect.top;
|
if (This->DestRect.bottom)
|
||||||
This->WindowPos.bottom = This->SourceRect.bottom;
|
{
|
||||||
|
This->WindowPos.top = This->DestRect.top;
|
||||||
|
This->WindowPos.bottom = This->DestRect.bottom;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
This->WindowPos.top = This->SourceRect.top;
|
||||||
|
This->WindowPos.bottom = This->SourceRect.bottom;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AdjustWindowRectEx(&This->WindowPos, style, TRUE, style_ex);
|
AdjustWindowRectEx(&This->WindowPos, style, TRUE, style_ex);
|
||||||
|
@ -740,7 +757,7 @@ static ULONG WINAPI VideoRenderer_Release(IBaseFilter * iface)
|
||||||
static HRESULT WINAPI VideoRenderer_Pause(IBaseFilter * iface)
|
static HRESULT WINAPI VideoRenderer_Pause(IBaseFilter * iface)
|
||||||
{
|
{
|
||||||
VideoRendererImpl *This = impl_from_IBaseFilter(iface);
|
VideoRendererImpl *This = impl_from_IBaseFilter(iface);
|
||||||
|
|
||||||
TRACE("(%p/%p)->()\n", This, iface);
|
TRACE("(%p/%p)->()\n", This, iface);
|
||||||
|
|
||||||
EnterCriticalSection(&This->renderer.csRenderLock);
|
EnterCriticalSection(&This->renderer.csRenderLock);
|
||||||
|
@ -781,9 +798,8 @@ static const IBaseFilterVtbl VideoRenderer_Vtbl =
|
||||||
};
|
};
|
||||||
|
|
||||||
/*** IUnknown methods ***/
|
/*** IUnknown methods ***/
|
||||||
static HRESULT WINAPI Basicvideo_QueryInterface(IBasicVideo *iface,
|
static HRESULT WINAPI Basicvideo_QueryInterface(IBasicVideo *iface, REFIID riid, LPVOID *ppvObj)
|
||||||
REFIID riid,
|
{
|
||||||
LPVOID*ppvObj) {
|
|
||||||
VideoRendererImpl *This = impl_from_IBasicVideo(iface);
|
VideoRendererImpl *This = impl_from_IBasicVideo(iface);
|
||||||
|
|
||||||
TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
|
TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
|
||||||
|
@ -852,9 +868,8 @@ static const IBasicVideoVtbl IBasicVideo_VTable =
|
||||||
|
|
||||||
|
|
||||||
/*** IUnknown methods ***/
|
/*** IUnknown methods ***/
|
||||||
static HRESULT WINAPI Videowindow_QueryInterface(IVideoWindow *iface,
|
static HRESULT WINAPI Videowindow_QueryInterface(IVideoWindow *iface, REFIID riid, LPVOID *ppvObj)
|
||||||
REFIID riid,
|
{
|
||||||
LPVOID*ppvObj) {
|
|
||||||
VideoRendererImpl *This = impl_from_IVideoWindow(iface);
|
VideoRendererImpl *This = impl_from_IVideoWindow(iface);
|
||||||
|
|
||||||
TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
|
TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
|
||||||
|
|
Loading…
Reference in New Issue