Commit 1583057f authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

mciqtz32: Fix window visibility.

parent a16cf584
...@@ -330,8 +330,7 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms ...@@ -330,8 +330,7 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
return MCIERR_INTERNAL; return MCIERR_INTERNAL;
} }
if (!wma->parent) IVideoWindow_put_Visible(wma->vidwin, OATRUE);
IVideoWindow_put_Visible(wma->vidwin, OATRUE);
if (dwFlags & MCI_NOTIFY) if (dwFlags & MCI_NOTIFY)
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL);
...@@ -770,8 +769,10 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS ...@@ -770,8 +769,10 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS
return 0; return 0;
if (dwFlags & MCI_DGV_WINDOW_HWND && (IsWindow(lpParms->hWnd) || !lpParms->hWnd)) { if (dwFlags & MCI_DGV_WINDOW_HWND && (IsWindow(lpParms->hWnd) || !lpParms->hWnd)) {
LONG visible = OATRUE;
LONG style = 0; LONG style = 0;
TRACE("Setting hWnd to %p\n", lpParms->hWnd); TRACE("Setting hWnd to %p\n", lpParms->hWnd);
IVideoWindow_get_Visible(wma->vidwin, &visible);
IVideoWindow_put_Visible(wma->vidwin, OAFALSE); IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
IVideoWindow_get_WindowStyle(wma->vidwin, &style); IVideoWindow_get_WindowStyle(wma->vidwin, &style);
style &= ~WS_CHILD; style &= ~WS_CHILD;
...@@ -781,7 +782,7 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS ...@@ -781,7 +782,7 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS
IVideoWindow_put_WindowStyle(wma->vidwin, style); IVideoWindow_put_WindowStyle(wma->vidwin, style);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpParms->hWnd); IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpParms->hWnd);
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpParms->hWnd); IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpParms->hWnd);
IVideoWindow_put_Visible(wma->vidwin, OATRUE); IVideoWindow_put_Visible(wma->vidwin, visible);
wma->parent = lpParms->hWnd; wma->parent = lpParms->hWnd;
} }
if (dwFlags & MCI_DGV_WINDOW_STATE) { if (dwFlags & MCI_DGV_WINDOW_STATE) {
...@@ -818,12 +819,15 @@ static DWORD MCIQTZ_mciUpdate(UINT wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS ...@@ -818,12 +819,15 @@ static DWORD MCIQTZ_mciUpdate(UINT wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS
BITMAPINFO *info; BITMAPINFO *info;
HRESULT hr; HRESULT hr;
RECT src, dest; RECT src, dest;
LONG visible = OATRUE;
res = MCIERR_INTERNAL; res = MCIERR_INTERNAL;
/* If in stopped state, nothing has been drawn to screen /* If in stopped state, nothing has been drawn to screen
* moving to pause, which is needed for the old dib renderer, will result * moving to pause, which is needed for the old dib renderer, will result
* in a single frame drawn, so hide the window here */ * in a single frame drawn, so hide the window here */
IVideoWindow_put_Visible(wma->vidwin, OAFALSE); IVideoWindow_get_Visible(wma->vidwin, &visible);
if (wma->parent)
IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
/* FIXME: Should we check the original state and restore it? */ /* FIXME: Should we check the original state and restore it? */
IMediaControl_Pause(wma->pmctrl); IMediaControl_Pause(wma->pmctrl);
IMediaControl_GetState(wma->pmctrl, -1, &state); IMediaControl_GetState(wma->pmctrl, -1, &state);
...@@ -846,7 +850,7 @@ static DWORD MCIQTZ_mciUpdate(UINT wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS ...@@ -846,7 +850,7 @@ static DWORD MCIQTZ_mciUpdate(UINT wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS
res = 0; res = 0;
out: out:
if (wma->parent) if (wma->parent)
IVideoWindow_put_Visible(wma->vidwin, OATRUE); IVideoWindow_put_Visible(wma->vidwin, visible);
} }
else if (dwFlags) else if (dwFlags)
FIXME("Unhandled flags %x\n", dwFlags); FIXME("Unhandled flags %x\n", dwFlags);
......
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