Commit bdf3f413 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Allow opening the clipboard again with the same owner.

parent e99c3f0c
......@@ -51,11 +51,12 @@ static void test_ClipboardOwner(void)
ok(OpenClipboard(0), "OpenClipboard failed\n");
ok(!GetClipboardOwner(), "clipboard should still be not owned\n");
ok(!OpenClipboard(hWnd1), "OpenClipboard should fail since clipboard already opened\n");
ok(OpenClipboard(0), "OpenClipboard again failed\n");
ret = CloseClipboard();
ok( ret, "CloseClipboard error %d\n", GetLastError());
ok(OpenClipboard(hWnd1), "OpenClipboard failed\n");
todo_wine ok(OpenClipboard(hWnd1), "OpenClipboard second time in the same hwnd failed\n");
ok(OpenClipboard(hWnd1), "OpenClipboard second time in the same hwnd failed\n");
SetLastError(0xdeadbeef);
ret = OpenClipboard(hWnd2);
......
......@@ -138,7 +138,7 @@ void cleanup_clipboard_thread(struct thread *thread)
static int open_clipboard( struct clipboard *clipboard, user_handle_t win )
{
win = get_user_full_handle( win );
if (clipboard->open_thread && clipboard->open_thread != current)
if (clipboard->open_thread && (clipboard->open_thread != current || clipboard->open_win != win))
{
set_error(STATUS_WAS_LOCKED);
return 0;
......
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