Akihiro Sagawa : mciqtz32: Hide the default video window when switching to another one.

Alexandre Julliard julliard at winehq.org
Wed Aug 10 14:54:34 CDT 2022


Module: wine
Branch: master
Commit: 6f7c0c76bf209c3d00419edf443fb5253b4e0510
URL:    https://gitlab.winehq.org/wine/wine/-/commit/6f7c0c76bf209c3d00419edf443fb5253b4e0510

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Sun Jul 31 20:49:25 2022 +0900

mciqtz32: Hide the default video window when switching to another one.

Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>

---

 dlls/mciqtz32/mciqtz.c | 3 +++
 dlls/winmm/tests/mci.c | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c
index 89f128831b6..952015e4c9f 100644
--- a/dlls/mciqtz32/mciqtz.c
+++ b/dlls/mciqtz32/mciqtz.c
@@ -1008,6 +1008,9 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS
             IBasicVideo_GetVideoSize(wma->vidbasic, &width, &height);
             IVideoWindow_SetWindowPosition(wma->vidwin, 0, 0, width, height);
 
+            if (wma->parent == wma->window)
+                ShowWindow(wma->window, SW_HIDE);
+
             wma->parent = hwnd;
         }
     }
diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c
index dc3a4973362..18dfdf1f74b 100644
--- a/dlls/winmm/tests/mci.c
+++ b/dlls/winmm/tests/mci.c
@@ -1658,7 +1658,7 @@ static void test_video_window(void)
 
         style = GetWindowLongW(video_window, GWL_STYLE);
         expected = testcase[i].expected_style;
-        todo_wine ok(style == expected, "Video window %p: got style %#lx, expected %#lx.\n",
+        ok(style == expected, "Video window %p: got style %#lx, expected %#lx.\n",
                 video_window, style, expected);
 
         /* destination size is reset to the source video size */
@@ -1688,14 +1688,14 @@ static void test_video_window(void)
         ok(!err, "Got %s.\n", dbg_mcierr(err));
         ok(IsWindowVisible(main_window), "Main window should be shown.\n");
         ok(IsWindow(video_window), "Video window should exist.\n");
-        todo_wine ok(!IsWindowVisible(video_window), "Video window should be hidden.\n");
+        ok(!IsWindowVisible(video_window), "Video window should be hidden.\n");
 
         /* video window is reset to the default window, which is visible again */
         parm.win.hWnd = NULL;
         err = mciSendCommandW(id, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm);
         ok(!err, "Got %s.\n", dbg_mcierr(err));
         ok(IsWindowVisible(main_window), "Main window should be shown.\n");
-        ok(IsWindowVisible(video_window), "Video window should be shown.\n");
+        todo_wine ok(IsWindowVisible(video_window), "Video window should be shown.\n");
 
         err = mciSendCommandW(id, MCI_WHERE, MCI_DGV_WHERE_DESTINATION, (DWORD_PTR)&parm);
         ok(!err, "Got %s.\n", dbg_mcierr(err));




More information about the wine-cvs mailing list