[PATCH v3 0/2] MR8511: ole32: Restore cursor in DoDragDrop.
The cursor is changed in give_feedback() but is not restored back. -- v3: ole32: Preserve cursor in DoDragDrop. ole32/tests: Test that cursor is preserved in DoDragDrop. https://gitlab.winehq.org/wine/wine/-/merge_requests/8511
From: Roman Pišl <rpisl(a)seznam.cz> --- dlls/ole32/tests/dragdrop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/ole32/tests/dragdrop.c b/dlls/ole32/tests/dragdrop.c index bd63c11401f..17f9edd6bf9 100644 --- a/dlls/ole32/tests/dragdrop.c +++ b/dlls/ole32/tests/dragdrop.c @@ -733,13 +733,17 @@ static void test_DoDragDrop(void) { for (seq = 0; seq < ARRAY_SIZE(call_lists); seq++) { + HCURSOR cursor; DWORD effect_in; trace("%d\n", seq); call_ptr = call_lists[seq]; effect_in = call_ptr->set_param; call_ptr++; + cursor = GetCursor(); hr = DoDragDrop(&DataObject, &DropSource, effect_in, &effect); + todo_wine + ok(GetCursor() == cursor, "cursor not restored\n"); check_expect(DoDragDrop_ret, hr, NULL); check_expect(DoDragDrop_effect_out, effect, NULL); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8511
From: Roman Pišl <rpisl(a)seznam.cz> --- dlls/ole32/ole2.c | 7 +++++++ dlls/ole32/tests/dragdrop.c | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index f4672b704ee..b37b5b0e387 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -733,6 +733,7 @@ HRESULT WINAPI DoDragDrop ( TrackerWindowInfo trackerInfo; HWND hwndTrackWindow; MSG msg; + HCURSOR cursor; TRACE("%p, %p, %#lx, %p.\n", pDataObject, pDropSource, dwOKEffect, pdwEffect); @@ -767,6 +768,9 @@ HRESULT WINAPI DoDragDrop ( msg.message = 0; + /* save cursor */ + cursor = GetCursor(); + /* * Pump messages. All mouse input should go to the capture window. */ @@ -813,6 +817,9 @@ HRESULT WINAPI DoDragDrop ( */ DestroyWindow(hwndTrackWindow); + /* restore cursor */ + SetCursor(cursor); + return trackerInfo.returnValue; } diff --git a/dlls/ole32/tests/dragdrop.c b/dlls/ole32/tests/dragdrop.c index 17f9edd6bf9..1c7dd07ea93 100644 --- a/dlls/ole32/tests/dragdrop.c +++ b/dlls/ole32/tests/dragdrop.c @@ -742,7 +742,6 @@ static void test_DoDragDrop(void) cursor = GetCursor(); hr = DoDragDrop(&DataObject, &DropSource, effect_in, &effect); - todo_wine ok(GetCursor() == cursor, "cursor not restored\n"); check_expect(DoDragDrop_ret, hr, NULL); check_expect(DoDragDrop_effect_out, effect, NULL); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8511
participants (1)
-
Roman Pišl