Akihiro Sagawa : mciqtz32: Fix MCI_DGV_WHERE_WINDOW behavior.

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


Module: wine
Branch: master
Commit: 23dabd570fbc54990743fcee6ed3ffb842593d01
URL:    https://gitlab.winehq.org/wine/wine/-/commit/23dabd570fbc54990743fcee6ed3ffb842593d01

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

mciqtz32: Fix MCI_DGV_WHERE_WINDOW behavior.

Use parent window dimensions instead of IVideoWindow ones.

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

---

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

diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c
index 2439bfeea62..fb941f26a86 100644
--- a/dlls/mciqtz32/mciqtz.c
+++ b/dlls/mciqtz32/mciqtz.c
@@ -966,7 +966,9 @@ static DWORD MCIQTZ_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lp
             rc.bottom -= rc.top;
             TRACE("MCI_DGV_WHERE_WINDOW_MAX %s\n", wine_dbgstr_rect(&rc));
         } else {
-            IVideoWindow_GetWindowPosition(wma->vidwin, &rc.left, &rc.top, &rc.right, &rc.bottom);
+            GetWindowRect(wma->parent, &rc);
+            rc.right -= rc.left;
+            rc.bottom -= rc.top;
             TRACE("MCI_DGV_WHERE_WINDOW %s\n", wine_dbgstr_rect(&rc));
         }
     }
diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c
index ee75a05d9c2..c4a92221d0f 100644
--- a/dlls/winmm/tests/mci.c
+++ b/dlls/winmm/tests/mci.c
@@ -1624,9 +1624,8 @@ static void test_video_window(void)
         ok(!err, "Got %s.\n", dbg_mcierr(err));
         win_rc.right -= win_rc.left;
         win_rc.bottom -= win_rc.top;
-        todo_wine_if (!(style & WS_CHILD))
-            ok(EqualRect(&win_rc, &parm.where.rc), "Got rect %s, expected %s.\n",
-                    wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&win_rc));
+        ok(EqualRect(&win_rc, &parm.where.rc), "Got rect %s, expected %s.\n",
+                wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&win_rc));
 
         err = mciSendCommandW(id, MCI_STOP, 0, (DWORD_PTR)&parm);
         ok(!err, "Got %s.\n", dbg_mcierr(err));




More information about the wine-cvs mailing list