Alexandre Julliard : user32: Notify the clipboard viewer on close even if we are not the owner.

Alexandre Julliard julliard at winehq.org
Thu Aug 25 10:39:37 CDT 2016


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Aug 25 21:55:21 2016 +0900

user32: Notify the clipboard viewer on close even if we are not the owner.

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

---

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

diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c
index 251eadb..6d62dfd 100644
--- a/dlls/user32/clipboard.c
+++ b/dlls/user32/clipboard.c
@@ -181,12 +181,12 @@ BOOL WINAPI CloseClipboard(void)
 
     if (!ret) return FALSE;
 
-    if (bCBHasChanged && owner)
+    if (bCBHasChanged)
     {
-        USER_Driver->pEndClipboardUpdate();
+        if (owner) USER_Driver->pEndClipboardUpdate();
+        bCBHasChanged = FALSE;
         if (viewer) SendNotifyMessageW(viewer, WM_DRAWCLIPBOARD, (WPARAM) GetClipboardOwner(), 0);
     }
-    bCBHasChanged = FALSE;
     return TRUE;
 }
 
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c
index d162e33..f01af3d 100644
--- a/dlls/user32/tests/clipboard.c
+++ b/dlls/user32/tests/clipboard.c
@@ -838,7 +838,7 @@ static DWORD WINAPI clipboard_thread(void *param)
         old_seq = seq;
     }
     count = SendMessageA( win, WM_USER+1, 0, 0 );
-    todo_wine ok( count, "WM_DRAWCLIPBOARD not received\n" );
+    ok( count, "WM_DRAWCLIPBOARD not received\n" );
     count = SendMessageA( win, WM_USER+2, 0, 0 );
     todo_wine ok( count || broken(!pAddClipboardFormatListener), "WM_CLIPBOARDUPDATE not received\n" );
 
@@ -881,7 +881,7 @@ static DWORD WINAPI clipboard_thread(void *param)
         old_seq = seq;
     }
     count = SendMessageA( win, WM_USER+1, 0, 0 );
-    todo_wine ok( count, "WM_DRAWCLIPBOARD not received\n" );
+    ok( count, "WM_DRAWCLIPBOARD not received\n" );
     count = SendMessageA( win, WM_USER+2, 0, 0 );
     todo_wine ok( count || broken(!pAddClipboardFormatListener), "WM_CLIPBOARDUPDATE not received\n" );
 




More information about the wine-cvs mailing list