user32: Don't disallow delayed rendering even when not the clipboard owner.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Alexandre Julliard 2016-08-23 17:57:50 +09:00
parent 42c221db6c
commit d9df977006
3 changed files with 3 additions and 13 deletions

View File

@ -352,14 +352,6 @@ HANDLE WINAPI SetClipboardData(UINT wFormat, HANDLE hData)
return 0;
}
/* If it's not owned, data can only be set if the format isn't
available and its rendering is not delayed */
if (!(flags & CB_OWNER) && !hData)
{
WARN("Clipboard not owned by calling task. Operation failed.\n");
return 0;
}
if (USER_Driver->pSetClipboardData(wFormat, hData, flags & CB_OWNER))
{
hResult = hData;

View File

@ -65,7 +65,7 @@ static DWORD WINAPI set_clipboard_data_thread(LPVOID arg)
if (GetClipboardOwner() == hwnd)
{
SetClipboardData( CF_WAVE, 0 );
todo_wine ok( IsClipboardFormatAvailable( CF_WAVE ), "%u: SetClipboardData failed\n", thread_from_line );
ok( IsClipboardFormatAvailable( CF_WAVE ), "%u: SetClipboardData failed\n", thread_from_line );
ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 ));
ok( ret != 0, "%u: SetClipboardData failed err %u\n", thread_from_line, GetLastError() );
}

View File

@ -3016,16 +3016,14 @@ BOOL CDECL X11DRV_SetClipboardData(UINT wFormat, HANDLE hData, BOOL owner)
DWORD flags = 0;
BOOL bResult = TRUE;
/* If it's not owned, data can only be set if the format data is not already owned
and its rendering is not delayed */
/* If it's not owned, data can only be set if the format data is not already owned */
if (!owner)
{
LPWINE_CLIPDATA lpRender;
X11DRV_CLIPBOARD_UpdateCache();
if (!hData ||
((lpRender = X11DRV_CLIPBOARD_LookupData(wFormat)) &&
if (((lpRender = X11DRV_CLIPBOARD_LookupData(wFormat)) &&
!(lpRender->wFlags & CF_FLAG_UNOWNED)))
bResult = FALSE;
else