Huw Davies : shell32/tests: Move the cursor away from the dropdown listbox.

Alexandre Julliard julliard at winehq.org
Fri Jan 4 12:02:47 CST 2019


Module: wine
Branch: master
Commit: 9d42c40aa315eaff1ee63c53b2217d86e7e82577
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9d42c40aa315eaff1ee63c53b2217d86e7e82577

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Jan  4 11:03:44 2019 +0000

shell32/tests: Move the cursor away from the dropdown listbox.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46275
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/tests/autocomplete.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/shell32/tests/autocomplete.c b/dlls/shell32/tests/autocomplete.c
index 0da164b..4f81214 100644
--- a/dlls/shell32/tests/autocomplete.c
+++ b/dlls/shell32/tests/autocomplete.c
@@ -799,6 +799,8 @@ START_TEST(autocomplete)
     HRESULT r;
     MSG msg;
     IAutoComplete* ac;
+    RECT win_rect;
+    POINT orig_pos;
 
     r = CoInitialize(NULL);
     ok(r == S_OK, "CoInitialize failed (0x%08x). Tests aborted.\n", r);
@@ -809,6 +811,11 @@ START_TEST(autocomplete)
     ok(hMainWnd != NULL, "Failed to create parent window. Tests aborted.\n");
     if (!hMainWnd) return;
 
+    /* Move the cursor away from the dropdown listbox */
+    GetWindowRect(hMainWnd, &win_rect);
+    GetCursorPos(&orig_pos);
+    SetCursorPos(win_rect.left, win_rect.top);
+
     test_invalid_init();
     ac = test_init();
     if (!ac)
@@ -826,6 +833,7 @@ START_TEST(autocomplete)
     IAutoComplete_Release(ac);
 
 cleanup:
+    SetCursorPos(orig_pos.x, orig_pos.y);
     DestroyWindow(hEdit);
     DestroyWindow(hMainWnd);
 




More information about the wine-cvs mailing list