vbox的更動 61908 路徑 trunk/src/VBox/Main
- 時間撮記:
- 2016-6-28 上午01:24:52 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/src-server/win/HostPowerWin.cpp
r60052 r61908 54 54 Log(("HostPowerServiceWin::!HostPowerServiceWin: destroy window %x\n", mHwnd)); 55 55 56 /* Is this allowed from another thread? */57 SetWindowLongPtr(mHwnd, 0, 0);58 56 /* Poke the thread out of the event loop and wait for it to clean up. */ 59 PostMessage(mHwnd, WM_ QUIT, 0, 0);57 PostMessage(mHwnd, WM_CLOSE, 0, 0); 60 58 RTThreadWait(mThread, 5000, NULL); 61 59 mThread = NIL_RTTHREAD; … … 117 115 MSG msg; 118 116 BOOL fRet; 119 while ((fRet = GetMessage(&msg, NULL, 0, 0)) !=0)117 while ((fRet = GetMessage(&msg, NULL, 0, 0)) > 0) 120 118 { 121 if (fRet != -1) 122 { 123 TranslateMessage(&msg); 124 DispatchMessage(&msg); 125 } 126 else 127 { 128 // handle the error and possibly exit 129 break; 130 } 119 TranslateMessage(&msg); 120 DispatchMessage(&msg); 131 121 } 122 /* 123 * Window procedure can return error, 124 * but this is exceptional situation 125 * that should be identified in testing 126 */ 127 Assert(fRet >= 0); 132 128 } 133 129 } 134 130 135 131 Log(("HostPowerServiceWin::NotificationThread: exit thread\n")); 136 if (hwnd)137 DestroyWindow(hwnd);138 132 139 133 if (atomWindowClass != 0) … … 214 208 } 215 209 210 case WM_DESTROY: 211 { 212 /* moved here. it can't work across theads */ 213 SetWindowLongPtr(hwnd, 0, 0); 214 PostQuitMessage(0); 215 return 0; 216 } 217 216 218 default: 217 219 return DefWindowProc(hwnd, msg, wParam, lParam);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器