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

strmbase: Track internal window styles in baseWindow.WindowStyles.

parent 3bc1bdae
......@@ -72,7 +72,6 @@ typedef struct VideoRendererImpl
IUnknown * pUnkOuter;
BOOL bUnkOuterValid;
BOOL bAggregatable;
LONG WindowStyle;
} VideoRendererImpl;
static inline VideoRendererImpl *impl_from_BaseWindow(BaseWindow *iface)
......@@ -982,7 +981,7 @@ static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
FIXME("(%p/%p)->(%d): stub !!!\n", This, iface, FullScreenMode);
if (FullScreenMode) {
This->WindowStyle = GetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE);
This->baseControlWindow.baseWindow.WindowStyles = GetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE);
ShowWindow(This->baseControlWindow.baseWindow.hWnd, SW_HIDE);
SetParent(This->baseControlWindow.baseWindow.hWnd, 0);
SetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE, WS_POPUP);
......@@ -992,7 +991,7 @@ static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
} else {
ShowWindow(This->baseControlWindow.baseWindow.hWnd, SW_HIDE);
SetParent(This->baseControlWindow.baseWindow.hWnd, This->baseControlWindow.hwndOwner);
SetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE, This->WindowStyle);
SetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE, This->baseControlWindow.baseWindow.WindowStyles);
GetClientRect(This->baseControlWindow.baseWindow.hWnd, &This->DestRect);
SetWindowPos(This->baseControlWindow.baseWindow.hWnd,0,This->DestRect.left,This->DestRect.top,This->DestRect.right,This->DestRect.bottom,SWP_NOZORDER|SWP_SHOWWINDOW);
This->WindowPos = This->DestRect;
......
......@@ -300,6 +300,7 @@ HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG W
SetWindowLongW(This->baseWindow.hWnd, GWL_STYLE, WindowStyle);
SetWindowPos(This->baseWindow.hWnd,0,0,0,0,0,SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOZORDER);
This->baseWindow.WindowStyles = WindowStyle;
return S_OK;
}
......@@ -310,7 +311,7 @@ HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle(IVideoWindow *iface, LONG *
TRACE("(%p/%p)->(%p)\n", This, iface, WindowStyle);
*WindowStyle = GetWindowLongW(This->baseWindow.hWnd, GWL_STYLE);
*WindowStyle = This->baseWindow.WindowStyles;
return S_OK;
}
......@@ -534,6 +535,15 @@ HRESULT WINAPI BaseControlWindowImpl_put_Owner(IVideoWindow *iface, OAHWND Owner
This->hwndOwner = (HWND)Owner;
SetParent(This->baseWindow.hWnd, This->hwndOwner);
if (This->baseWindow.WindowStyles & WS_CHILD)
{
LONG old = GetWindowLongW(This->baseWindow.hWnd, GWL_STYLE);
if (old != This->baseWindow.WindowStyles)
{
SetWindowLongW(This->baseWindow.hWnd, GWL_STYLE, This->baseWindow.WindowStyles);
SetWindowPos(This->baseWindow.hWnd,0,0,0,0,0,SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOZORDER);
}
}
return S_OK;
}
......
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