Changeset 74439 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray
- Timestamp:
- Sep 24, 2018 12:30:47 PM (6 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxTray
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp
r74411 r74439 94 94 mEventSem(NIL_RTSEMEVENT), 95 95 hWnd(NULL), 96 uAllActions(VBOX_DND_ACTION_IGNORE),96 dndLstActionsAllowed(VBOX_DND_ACTION_IGNORE), 97 97 mfMouseButtonDown(false), 98 98 #ifdef VBOX_WITH_DRAG_AND_DROP_GH … … 477 477 hide(); 478 478 479 LogFlowThisFunc(("Starting drag and drop: uAllActions=0x%x, dwOKEffects=0x%x ...\n",480 uAllActions, startupInfo.dwOKEffects));479 LogFlowThisFunc(("Starting drag and drop: dndLstActionsAllowed=0x%x, dwOKEffects=0x%x ...\n", 480 dndLstActionsAllowed, startupInfo.dwOKEffects)); 481 481 482 482 AssertPtr(startupInfo.pDataObject); … … 561 561 RTCList<RTCString> lstFormats = 562 562 RTCString(pVbglR3Event->u.HG_Enter.pszFormats, pVbglR3Event->u.HG_Enter.cbFormats - 1).split("\r\n"); 563 rc = OnHgEnter(lstFormats, pVbglR3Event->u.HG_Enter. uAllActions);563 rc = OnHgEnter(lstFormats, pVbglR3Event->u.HG_Enter.dndLstActionsAllowed); 564 564 if (RT_FAILURE(rc)) 565 565 break; … … 580 580 { 581 581 rc = OnHgMove(pVbglR3Event->u.HG_Move.uXpos, pVbglR3Event->u.HG_Move.uYpos, 582 pVbglR3Event->u.HG_Move. uDefAction);582 pVbglR3Event->u.HG_Move.dndActionDefault); 583 583 break; 584 584 } … … 628 628 case VBGLR3DNDEVENTTYPE_GH_DROP: 629 629 { 630 rc = OnGhDrop(pVbglR3Event->u.GH_Drop.pszFormat, pVbglR3Event->u.GH_Drop. uAction);630 rc = OnGhDrop(pVbglR3Event->u.GH_Drop.pszFormat, pVbglR3Event->u.GH_Drop.dndActionRequested); 631 631 break; 632 632 } … … 769 769 * @return IPRT status code. 770 770 * @param lstFormats Supported formats offered by the host. 771 * @param uAllActionsSupported actions offered by the host.772 */ 773 int VBoxDnDWnd::OnHgEnter(const RTCList<RTCString> &lstFormats, uint32_t uAllActions)771 * @param dndLstActionsAllowed Supported actions offered by the host. 772 */ 773 int VBoxDnDWnd::OnHgEnter(const RTCList<RTCString> &lstFormats, VBOXDNDACTIONLIST dndLstActionsAllowed) 774 774 { 775 775 if (mMode == GH) /* Wrong mode? Bail out. */ … … 777 777 778 778 #ifdef DEBUG 779 LogFlowThisFunc((" uActions=0x%x, lstFormats=%zu: ", uAllActions, lstFormats.size()));779 LogFlowThisFunc(("dndActionList=0x%x, lstFormats=%zu: ", dndLstActionsAllowed, lstFormats.size())); 780 780 for (size_t i = 0; i < lstFormats.size(); i++) 781 781 LogFlow(("'%s' ", lstFormats.at(i).c_str())); … … 791 791 { 792 792 /* Save all allowed actions. */ 793 this-> uAllActions = uAllActions;793 this->dndLstActionsAllowed = dndLstActionsAllowed; 794 794 795 795 /* … … 876 876 /* Translate our drop actions into allowed Windows drop effects. */ 877 877 startupInfo.dwOKEffects = DROPEFFECT_NONE; 878 if ( uAllActions)879 { 880 if ( uAllActions& VBOX_DND_ACTION_COPY)878 if (dndLstActionsAllowed) 879 { 880 if (dndLstActionsAllowed & VBOX_DND_ACTION_COPY) 881 881 startupInfo.dwOKEffects |= DROPEFFECT_COPY; 882 if ( uAllActions& VBOX_DND_ACTION_MOVE)882 if (dndLstActionsAllowed & VBOX_DND_ACTION_MOVE) 883 883 startupInfo.dwOKEffects |= DROPEFFECT_MOVE; 884 if ( uAllActions& VBOX_DND_ACTION_LINK)884 if (dndLstActionsAllowed & VBOX_DND_ACTION_LINK) 885 885 startupInfo.dwOKEffects |= DROPEFFECT_LINK; 886 886 } … … 1196 1196 if (RT_SUCCESS(rc)) 1197 1197 { 1198 uint32_t uDefAction= VBOX_DND_ACTION_IGNORE;1198 uint32_t dndActionDefault = VBOX_DND_ACTION_IGNORE; 1199 1199 1200 1200 AssertPtr(pDropTarget); … … 1202 1202 if (!strFormats.isEmpty()) 1203 1203 { 1204 uDefAction= VBOX_DND_ACTION_COPY;1205 1206 LogFlowFunc(("Acknowledging pDropTarget=0x%p, uDefAction=0x%x, uAllActions=0x%x, strFormats=%s\n",1207 pDropTarget, uDefAction, uAllActions, strFormats.c_str()));1204 dndActionDefault = VBOX_DND_ACTION_COPY; 1205 1206 LogFlowFunc(("Acknowledging pDropTarget=0x%p, dndActionDefault=0x%x, dndLstActionsAllowed=0x%x, strFormats=%s\n", 1207 pDropTarget, dndActionDefault, dndLstActionsAllowed, strFormats.c_str())); 1208 1208 } 1209 1209 else … … 1214 1214 1215 1215 /** @todo Support more than one action at a time. */ 1216 uAllActions = uDefAction;1216 dndLstActionsAllowed = dndActionDefault; 1217 1217 1218 1218 int rc2 = VbglR3DnDGHSendAckPending(&mDnDCtx, 1219 uDefAction, uAllActions,1219 dndActionDefault, dndLstActionsAllowed, 1220 1220 strFormats.c_str(), (uint32_t)strFormats.length() + 1 /* Include termination */); 1221 1221 if (RT_FAILURE(rc2)) … … 1550 1550 1551 1551 this->lstFmtActive.clear(); 1552 this-> uAllActions= VBOX_DND_ACTION_IGNORE;1552 this->dndLstActionsAllowed = VBOX_DND_ACTION_IGNORE; 1553 1553 1554 1554 int rc2 = setMode(Unknown); -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.h
r74380 r74439 380 380 * drag'n drop operation. */ 381 381 RTCList<RTCString> lstFmtActive; 382 /** Flags of all current drag'n drop 383 * actions allowed. */ 384 uint32_t uAllActions; 382 /** List of all current drag'n drop actions allowed. */ 383 VBOXDNDACTIONLIST dndLstActionsAllowed; 385 384 /** The startup information required 386 385 * for the actual DoDragDrop() call. */
Note:
See TracChangeset
for help on using the changeset viewer.