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

Alexandre Julliard julliard at winehq.org
Tue Aug 23 11:28:44 CDT 2016


Module: wine
Branch: master
Commit: d9df977006bceb883ccd68afb9b57a0da3ae4112
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d9df977006bceb883ccd68afb9b57a0da3ae4112

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Aug 23 17:57:50 2016 +0900

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

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/clipboard.c       | 8 --------
 dlls/user32/tests/clipboard.c | 2 +-
 dlls/winex11.drv/clipboard.c  | 6 ++----
 3 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c
index c72a76b..251eadb 100644
--- a/dlls/user32/clipboard.c
+++ b/dlls/user32/clipboard.c
@@ -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;
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c
index 33a9c69..ddd8d1a 100644
--- a/dlls/user32/tests/clipboard.c
+++ b/dlls/user32/tests/clipboard.c
@@ -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() );
     }
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index 9b8ff65..b7c89cb 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -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




More information about the wine-cvs mailing list