Module: wine Branch: master Commit: f38318705c4d234de95c4676799e52c8757a93eb URL: http://source.winehq.org/git/wine.git/?a=commit;h=f38318705c4d234de95c467679...
Author: Aric Stewart aric@codeweavers.com Date: Thu Apr 26 11:29:09 2012 -0500
strmbase: Track internal window styles in baseWindow.WindowStyles.
---
dlls/quartz/videorenderer.c | 5 ++--- dlls/strmbase/window.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 96f9815..87f3ea9 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -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; diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index ffb0425..cb448e3 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -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; }