vbox的更動 61908 路徑 trunk/src/VBox/HostServices
- 時間撮記:
- 2016-6-28 上午01:24:52 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
r61724 r61908 62 62 63 63 RTTHREAD thread; 64 bool volatile fTerminate;65 64 66 65 HANDLE hRenderEvent; … … 649 648 } break; 650 649 651 case WM_CLOSE: 652 { 653 /* Do nothing. Ignore the message. */ 650 case WM_DESTROY: 651 { 652 /* MS recommends to remove from Clipboard chain in this callback */ 653 Assert(pCtx->hwnd); 654 removeFromCBChain(pCtx); 655 if (pCtx->timerRefresh) 656 KillTimer(pCtx->hwnd, 0); 657 PostQuitMessage(0); 654 658 } break; 655 659 … … 716 720 717 721 MSG msg; 718 while (GetMessage(&msg, NULL, 0, 0) && !pCtx->fTerminate) 722 BOOL msgret = 0; 723 while ((msgret = GetMessage(&msg, NULL, 0, 0)) > 0) 719 724 { 720 725 TranslateMessage(&msg); 721 726 DispatchMessage(&msg); 722 727 } 723 } 724 } 725 726 if (pCtx->hwnd) 727 { 728 removeFromCBChain(pCtx); 729 if (pCtx->timerRefresh) 730 KillTimer(pCtx->hwnd, 0); 731 732 DestroyWindow (pCtx->hwnd); 733 pCtx->hwnd = NULL; 734 } 728 /* 729 * Window procedure can return error, 730 * but this is exceptional situation 731 * that should be identified in testing 732 */ 733 Assert(msgret >= 0); 734 Log(("VBoxClipboardThread Message loop finished. GetMessage returned %d, message id: %d \n", msgret, msg.message)); 735 } 736 } 737 738 pCtx->hwnd = NULL; 735 739 736 740 if (atomWindowClass != 0) … … 772 776 Log(("vboxClipboardDestroy\n")); 773 777 774 /* Set the termination flag and ping the window thread. */775 ASMAtomicWriteBool (&g_ctx.fTerminate, true);776 777 778 if (g_ctx.hwnd) 778 779 { 779 PostMessage (g_ctx.hwnd, WM_CLOSE, 0, 0);780 int rc = PostMessage (g_ctx.hwnd, WM_CLOSE, 0, 0); 780 781 } 781 782
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器