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