Changeset 76105 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp
- Timestamp:
- Dec 10, 2018 11:21:07 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp
r76104 r76105 769 769 770 770 /** 771 * Aborts an in-flight DnD operation on the guest. 772 * 773 * @return VBox status code. 774 */ 775 int VBoxDnDWnd::Abort(void) 776 { 777 LogFlowThisFunc(("mMode=%ld, mState=%RU32\n", mMode, mState)); 778 LogRel(("DnD: Drag and drop operation aborted\n")); 779 780 int rc = RTCritSectEnter(&mCritSect); 781 if (RT_SUCCESS(rc)) 782 { 783 if (startupInfo.pDataObject) 784 startupInfo.pDataObject->Abort(); 785 786 RTCritSectLeave(&mCritSect); 787 } 788 789 /* Post ESC to our window to officially abort the 790 * drag and drop operation. */ 791 this->PostMessage(WM_KEYDOWN, VK_ESCAPE /* wParam */, 0 /* lParam */); 792 793 Reset(); 794 795 return rc; 796 } 797 798 /** 771 799 * Handles actions required when the host cursor enters 772 800 * the guest's screen to initiate a host -> guest DnD operation. … … 977 1005 return VERR_WRONG_ORDER; 978 1006 979 LogFlowThisFunc(("mMode=%ld, mState=%RU32\n", mMode, mState)); 980 LogRel(("DnD: Drag and drop operation aborted\n")); 981 982 Reset(); 983 984 int rc = VINF_SUCCESS; 985 986 /* Post ESC to our window to officially abort the 987 * drag and drop operation. */ 988 this->PostMessage(WM_KEYDOWN, VK_ESCAPE /* wParam */, 0 /* lParam */); 1007 int rc = Abort(); 989 1008 990 1009 LogFlowFuncLeaveRC(rc); … … 1086 1105 int VBoxDnDWnd::OnHgCancel(void) 1087 1106 { 1088 int rc = RTCritSectEnter(&mCritSect); 1089 if (RT_SUCCESS(rc)) 1090 { 1091 if (startupInfo.pDataObject) 1092 startupInfo.pDataObject->Abort(); 1093 1094 RTCritSectLeave(&mCritSect); 1095 } 1096 1097 int rc2 = mouseRelease(); 1098 if (RT_SUCCESS(rc)) 1099 rc = rc2; 1100 1101 Reset(); 1102 1103 return rc; 1107 return Abort(); 1104 1108 } 1105 1109 … … 1875 1879 /* Make sure our proxy window is hidden when an error occured to 1876 1880 * not block the guest's UI. */ 1877 pWnd->Reset(); 1881 int rc2 = pWnd->Abort(); 1882 AssertRC(rc2); 1878 1883 } 1879 1884
Note:
See TracChangeset
for help on using the changeset viewer.