user32: Allows OpenClipboard more than once in the same HWND

Bruno Jesus 00cpxxx at gmail.com
Mon Jan 6 15:59:27 CST 2014


Fixes bug http://bugs.winehq.org/show_bug.cgi?id=2805
-------------- next part --------------
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c
index d9ebb23..f0c50a3 100644
--- a/dlls/user32/tests/clipboard.c
+++ b/dlls/user32/tests/clipboard.c
@@ -66,7 +66,7 @@ static void test_ClipboardOwner(void)
     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);
diff --git a/server/clipboard.c b/server/clipboard.c
index 0c39319..9dbeef3 100644
--- a/server/clipboard.c
+++ b/server/clipboard.c
@@ -201,7 +201,7 @@ DECL_HANDLER(set_clipboard_info)
 
     if (req->flags & SET_CB_OPEN)
     {
-        if (clipboard->open_thread)
+        if (clipboard->open_thread && clipboard->open_win != req->clipboard)
         {
             /* clipboard already opened */
             set_error(STATUS_WAS_LOCKED);


More information about the wine-patches mailing list