Maarten Lankhorst : quartz: Add support for fullscreen mode in video renderer.

Alexandre Julliard julliard at winehq.org
Thu Nov 25 11:18:54 CST 2010


Module: wine
Branch: master
Commit: ab2e5c0499afef511f37bf87bcc05d0dec347703
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ab2e5c0499afef511f37bf87bcc05d0dec347703

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Thu Nov 25 00:11:53 2010 +0100

quartz: Add support for fullscreen mode in video renderer.

---

 dlls/quartz/videorenderer.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index d26ecb5..31c9ab5 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -82,6 +82,7 @@ typedef struct VideoRendererImpl
     BOOL ThreadResult;
     HWND hWnd;
     HWND hWndMsgDrain;
+    HWND hWndOwner;
     BOOL AutoShow;
     RECT SourceRect;
     RECT DestRect;
@@ -555,7 +556,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
     ZeroMemory(&pVideoRenderer->SourceRect, sizeof(RECT));
     ZeroMemory(&pVideoRenderer->DestRect, sizeof(RECT));
     ZeroMemory(&pVideoRenderer->WindowPos, sizeof(RECT));
-    pVideoRenderer->hWndMsgDrain = NULL;
+    pVideoRenderer->hWndMsgDrain = pVideoRenderer->hWndOwner = NULL;
     pVideoRenderer->WindowStyle = WS_OVERLAPPED;
 
     /* construct input pin */
@@ -1890,7 +1891,8 @@ static HRESULT WINAPI Videowindow_put_Owner(IVideoWindow *iface,
 
     TRACE("(%p/%p)->(%08x)\n", This, iface, (DWORD) Owner);
 
-    SetParent(This->hWnd, (HWND)Owner);
+    This->hWndOwner = (HWND)Owner;
+    SetParent(This->hWnd, This->hWndOwner);
     if (This->WindowStyle & WS_CHILD)
     {
         LONG old = GetWindowLongA(This->hWnd, GWL_STYLE);
@@ -1910,7 +1912,7 @@ static HRESULT WINAPI Videowindow_get_Owner(IVideoWindow *iface,
 
     TRACE("(%p/%p)->(%p)\n", This, iface, Owner);
 
-    *(HWND*)Owner = GetParent(This->hWnd);
+    *(HWND*)Owner = This->hWndOwner;
 
     return S_OK;
 }
@@ -1970,6 +1972,22 @@ static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
 
     FIXME("(%p/%p)->(%d): stub !!!\n", This, iface, FullScreenMode);
 
+    if (FullScreenMode) {
+        ShowWindow(This->hWnd, SW_HIDE);
+        SetParent(This->hWnd, 0);
+        SetWindowLongA(This->hWnd, GWL_STYLE, WS_POPUP);
+        SetWindowPos(This->hWnd,HWND_TOP,0,0,GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN),SWP_SHOWWINDOW);
+        GetWindowRect(This->hWnd, &This->DestRect);
+        This->WindowPos = This->DestRect;
+    } else {
+        ShowWindow(This->hWnd, SW_HIDE);
+        SetParent(This->hWnd, This->hWndOwner);
+        SetWindowLongA(This->hWnd, GWL_STYLE, This->WindowStyle);
+        GetClientRect(This->hWnd, &This->DestRect);
+        SetWindowPos(This->hWnd,0,This->DestRect.left,This->DestRect.top,This->DestRect.right,This->DestRect.bottom,SWP_NOZORDER|SWP_SHOWWINDOW);
+        This->WindowPos = This->DestRect;
+    }
+
     return S_OK;
 }
 




More information about the wine-cvs mailing list