vbox的更動 97826 路徑 trunk/src/VBox/Additions/x11
- 時間撮記:
- 2022-12-16 下午02:43:00 (2 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
r97768 r97826 314 314 } 315 315 316 /** 317 * Returns a filtered X11 atom list. 318 * 319 * @returns Filtered list. 320 * @param formatList Atom list to convert. 321 * @param filterList Atom list to filter out. 322 */ 323 inline VBoxDnDAtomList xAtomListFiltered(const VBoxDnDAtomList &formatList, const VBoxDnDAtomList &filterList) 324 { 325 VBoxDnDAtomList tempList = formatList; 326 tempList.filter(filterList); 327 return tempList; 328 } 329 316 330 RTCString xErrorToString(int xRc) const; 317 331 Window applicationWindowBelowCursor(Window parentWin) const; … … 640 654 * Set to -1 if not set yet. */ 641 655 int m_lastMouseY; 656 /** List of default (Atom) formats required for X11 Xdnd handling. 657 * This list will be included by \a m_lstAtomFormats. */ 658 VBoxDnDAtomList m_lstAtomFormatsX11; 642 659 /** List of (Atom) formats the current source/target window supports. */ 643 660 VBoxDnDAtomList m_lstAtomFormats; … … 735 752 , m_enmState(Uninitialized) 736 753 { 754 /* Append default targets we support. 755 * Note: The order is sorted by preference; be careful when changing this. */ 756 m_lstAtomFormatsX11.append(xAtom(XA_TARGETS)); 757 m_lstAtomFormatsX11.append(xAtom(XA_MULTIPLE)); 758 /** @todo Support INC (incremental transfers). */ 737 759 } 738 760 … … 805 827 m_lstAtomActions.clear(); 806 828 807 /* First, clear the formats list. */ 829 /* First, clear the formats list and apply the X11-specific default formats, 830 * required for making Xdnd to work. */ 808 831 m_lstAtomFormats.clear(); 809 /* Append default targets we support. 810 * Note: The order is sorted by preference; be careful when changing this. */ 811 m_lstAtomFormats.append(xAtom(XA_TARGETS)); 812 m_lstAtomFormats.append(xAtom(XA_MULTIPLE)); 813 /** @todo Support INC (incremental transfers). */ 832 m_lstAtomFormats.append(m_lstAtomFormatsX11); 814 833 815 834 m_wndCur = 0; … … 2335 2354 if (RT_SUCCESS(rc2)) 2336 2355 { 2337 RTCString strFormatsCur = gX11->xAtomListToString(m_lstAtomFormats); 2338 if (!strFormatsCur.isEmpty()) 2339 { 2340 strFormats = strFormatsCur; 2356 /* Filter out the default X11-specific formats (required for Xdnd, 'TARGET' / 'MULTIPLE'); 2357 * those will not be supported by VirtualBox. */ 2358 VBoxDnDAtomList const lstAtomFormatsFiltered = gX11->xAtomListFiltered(m_lstAtomFormats, m_lstAtomFormatsX11); 2359 2360 /* Anything left to report to the host? */ 2361 if (lstAtomFormatsFiltered.size()) 2362 { 2363 strFormats = gX11->xAtomListToString(lstAtomFormatsFiltered); 2341 2364 dndActionDefault = VBOX_DND_ACTION_COPY; /** @todo Handle default action! */ 2342 2365 dndActionList = VBOX_DND_ACTION_COPY; /** @todo Ditto. */ … … 2345 2368 2346 2369 RTCritSectLeave(&m_dataCS); 2370 } 2371 2372 if (g_cVerbosity) 2373 { 2374 char *pszActions = DnDActionListToStrA(dndActionList); 2375 AssertPtrReturn(pszActions, VERR_NO_MEMORY); 2376 VBClLogVerbose(1, "Reporting formats '%s' (actions '%s' / %#x, default action is '%s' (%#x)\n", 2377 strFormats.c_str(), pszActions, dndActionList, DnDActionToStr(dndActionDefault), dndActionDefault); 2378 RTStrFree(pszActions); 2347 2379 } 2348 2380
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器