Changeset 5558 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Oct 30, 2007 12:57:20 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/win32.cpp
r4711 r5558 43 43 44 44 VBOXCLIPBOARDCLIENTDATA *pClient; 45 46 volatile uint32_t u32Announcing;47 45 }; 48 46 … … 225 223 Log(("WM_DRAWCLIPBOARD next %p\n", pCtx->hwndNextInChain)); 226 224 227 if ( ASMAtomicCmpXchgU32 (&pCtx->u32Announcing, 0, 1) == false)228 { 229 /* C ould not do 1->0 transition. That means u32Announcing is 0. */225 if (GetClipboardOwner () != hwnd) 226 { 227 /* Clipboard was updated by another application. */ 230 228 vboxClipboardChanged (pCtx); 231 229 } … … 395 393 dprintf(("window proc WM_USER: VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT\n")); 396 394 397 /* Prevent the WM_DRAWCLIPBOARD processing. Will be reset in WM_DRAWCLIPBOARD. */ 398 if (ASMAtomicCmpXchgU32 (&pCtx->u32Announcing, 1, 0) == true) 399 { 400 hClip = SetClipboardData (CF_UNICODETEXT, NULL); 401 } 395 hClip = SetClipboardData (CF_UNICODETEXT, NULL); 402 396 } 403 397 … … 406 400 dprintf(("window proc WM_USER: VBOX_SHARED_CLIPBOARD_FMT_BITMAP\n")); 407 401 408 /* Prevent the WM_DRAWCLIPBOARD processing. Will be reset in WM_DRAWCLIPBOARD. */ 409 if (ASMAtomicCmpXchgU32 (&pCtx->u32Announcing, 1, 0) == true) 410 { 411 hClip = SetClipboardData (CF_DIB, NULL); 412 } 402 hClip = SetClipboardData (CF_DIB, NULL); 413 403 } 414 404 … … 419 409 if (format != 0) 420 410 { 421 /* Prevent the WM_DRAWCLIPBOARD processing. Will be reset in WM_DRAWCLIPBOARD. */ 422 if (ASMAtomicCmpXchgU32 (&pCtx->u32Announcing, 1, 0) == true) 423 { 424 hClip = SetClipboardData (format, NULL); 425 } 411 hClip = SetClipboardData (format, NULL); 426 412 } 427 413 } … … 536 522 g_ctx.hRenderEvent = CreateEvent(NULL, TRUE, FALSE, NULL); 537 523 538 g_ctx.u32Announcing = 0;539 540 524 rc = RTThreadCreate (&g_ctx.thread, VBoxClipboardThread, NULL, 65536, 541 525 RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "SHCLIP");
Note:
See TracChangeset
for help on using the changeset viewer.