server: Allow opening the clipboard again with the same owner.
This commit is contained in:
parent
e99c3f0c4b
commit
bdf3f413af
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue