- Timestamp:
- Nov 12, 2020 7:59:52 AM (4 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp
r85746 r86869 610 610 } 611 611 612 case VBGLR3DNDEVENTTYPE_QUIT: 613 { 614 LogRel(("DnD: Received quit message, shutting down ...\n")); 615 PostQuitMessage(0); 616 } 617 612 618 #ifdef VBOX_WITH_DRAG_AND_DROP_GH 613 619 case VBGLR3DNDEVENTTYPE_GH_ERROR: … … 1877 1883 LogRel(("DnD: Processing proxy window event %RU32 failed with %Rrc\n", pVbglR3Event->enmType, rc)); 1878 1884 } 1879 else if (rc == VERR_INTERRUPTED) /* Disconnected from service. */1880 {1881 LogRel(("DnD: Received quit message, shutting down ...\n"));1882 pWnd->PostMessage(WM_QUIT, 0 /* wParm */, 0 /* lParm */);1883 rc = VINF_SUCCESS;1884 }1885 1885 1886 1886 if (RT_FAILURE(rc)) -
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibDragAndDrop.cpp
r85746 r86869 61 61 * 62 62 * @returns IPRT status code. 63 * Will return VERR_CANCELLED (implemented by the host service) if we need to bail out. 63 64 * @param pCtx DnD context to use. 64 65 * @param puMsg Where to store the message type. … … 72 73 AssertPtrReturn(pcParms, VERR_INVALID_POINTER); 73 74 74 HGCMMsgGetNext Msg; 75 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_FN_GET_NEXT_HOST_MSG, 3); 76 Msg.uMsg.SetUInt32(0); 77 Msg.cParms.SetUInt32(0); 78 Msg.fBlock.SetUInt32(fWait ? 1 : 0); 79 80 int rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg)); 81 if (RT_SUCCESS(rc)) 82 { 83 rc = Msg.uMsg.GetUInt32(puMsg); AssertRC(rc); 84 rc = Msg.cParms.GetUInt32(pcParms); AssertRC(rc); 85 } 75 int rc; 76 77 do 78 { 79 HGCMMsgGetNext Msg; 80 VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_FN_GET_NEXT_HOST_MSG, 3); 81 Msg.uMsg.SetUInt32(0); 82 Msg.cParms.SetUInt32(0); 83 Msg.fBlock.SetUInt32(fWait ? 1 : 0); 84 85 rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg)); 86 if (RT_SUCCESS(rc)) 87 { 88 rc = Msg.uMsg.GetUInt32(puMsg); AssertRC(rc); 89 rc = Msg.cParms.GetUInt32(pcParms); AssertRC(rc); 90 } 91 92 } while (rc == VERR_INTERRUPTED); 86 93 87 94 return rc; … … 1078 1085 { 1079 1086 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 1087 1088 if (!pCtx->uClientID) /* Already disconnected? Bail out early. */ 1089 return VINF_SUCCESS; 1090 1080 1091 int rc = VbglR3HGCMDisconnect(pCtx->uClientID); 1081 1092 if (RT_SUCCESS(rc)) 1082 1093 pCtx->uClientID = 0; 1094 1083 1095 return rc; 1084 1096 } … … 1162 1174 rc = VbglR3DnDConnect(pCtx); 1163 1175 } 1176 } 1177 1178 if (rc == VERR_CANCELLED) /* Host service told us that we have to bail out. */ 1179 { 1180 pEvent->enmType = VBGLR3DNDEVENTTYPE_QUIT; 1181 1182 *ppEvent = pEvent; 1183 1184 return VINF_SUCCESS; 1164 1185 } 1165 1186 -
trunk/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.cpp
r85749 r86869 147 147 void DragAndDropClient::disconnect(void) RT_NOEXCEPT 148 148 { 149 LogFlowThisFunc(("uClient=%RU32\n", m_idClient)); 150 149 LogFlowThisFunc(("uClient=%RU32, fDeferred=%RTbool\n", m_idClient, IsDeferred())); 150 151 /* 152 * If the client still is waiting for a message (i.e in deferred mode), 153 * complete the call with a VERR_CANCELED status so that the client (VBoxTray / VBoxClient) knows 154 * it should bail out. 155 */ 151 156 if (IsDeferred()) 152 CompleteDeferred(VERR_ INTERRUPTED);157 CompleteDeferred(VERR_CANCELLED); 153 158 154 159 /* … … 471 476 break; 472 477 } 473 474 #ifdef DEBUG_andy475 LogFlowFunc(("Mode (%RU32) check rc=%Rrc\n", modeGet(), rc));476 #endif477 478 478 479 #define DO_HOST_CALLBACK(); \ … … 1028 1029 if (rc == VINF_HGCM_ASYNC_EXECUTE) 1029 1030 { 1031 LogFlowFunc(("Deferring client %RU32\n", idClient)); 1032 1030 1033 try 1031 1034 {
Note:
See TracChangeset
for help on using the changeset viewer.