[2/4] user32: When sending the WM_DRAWCLIPBOARD message, pass the clipboard owner in wParam.

Alexander Scott-Johns alexander.scott.johns at googlemail.com
Tue Sep 22 20:16:30 CDT 2009


-------------- next part --------------
From 7bd60a2a7d1b080df1b3e3282fb19e7c33e76678 Mon Sep 17 00:00:00 2001
From: Alexander Scott-Johns <alexander.scott.johns at googlemail.com>
Date: Wed, 23 Sep 2009 01:30:28 +0100
Subject: user32: When sending the WM_DRAWCLIPBOARD message, pass the clipboard owner in wParam.

---
 dlls/user32/clipboard.c |    2 +-
 dlls/user32/tests/msg.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c
index b0ff10d..ec991b8 100644
--- a/dlls/user32/clipboard.c
+++ b/dlls/user32/clipboard.c
@@ -285,7 +285,7 @@ BOOL WINAPI CloseClipboard(void)
             USER_Driver->pEndClipboardUpdate();
 
             if (hWndViewer)
-                SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, 0, 0);
+                SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, (WPARAM) GetClipboardOwner(), 0);
 
             bCBHasChanged = FALSE;
         }
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 5c1a9d7..517e029 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -11820,12 +11820,12 @@ static void test_clipboard_viewers(void)
     /* Test that changing the clipboard actually refreshes the registered viewer. */
     clear_clipboard(hWnd1);
     wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner();
-    ok_sequence(wm_clipboard_changed, "clear clipbd (viewer=owner=1)", TRUE);
+    ok_sequence(wm_clipboard_changed, "clear clipbd (viewer=owner=1)", FALSE);
 
     /* Again, but with different owner. */
     clear_clipboard(hWnd2);
     wm_clipboard_changed_and_owned[1].wParam = (WPARAM) GetClipboardOwner();
-    ok_sequence(wm_clipboard_changed_and_owned, "clear clipbd (viewer=1, owner=2)", TRUE);
+    ok_sequence(wm_clipboard_changed_and_owned, "clear clipbd (viewer=1, owner=2)", FALSE);
 
     /* Test re-registering same window. */
     hRet = SetClipboardViewer(hWnd1);
-- 
1.6.0.4


More information about the wine-patches mailing list