Changeset 97822 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Dec 16, 2022 9:29:14 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 154902
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
r97802 r97822 317 317 * which are not supported by the host. 318 318 */ 319 GuestDnDMIMEList lstFiltered = GuestDnD::toFilteredFormatList(m_lstFmtSupported, pState->formats()); 319 GuestDnDMIMEList const &lstGuest = pState->formats(); 320 GuestDnDMIMEList const lstFiltered = GuestDnD::toFilteredFormatList(m_lstFmtSupported, lstGuest); 320 321 if (lstFiltered.size()) 321 322 { … … 333 334 } 334 335 else 335 hrc = i_setErrorAndReset(tr("Negotiation of formats between guest and host failed!\n\nHost offers: %s\n\nGuest offers: %s"), 336 GuestDnD::toFormatString(m_lstFmtSupported , ",").c_str(), 337 GuestDnD::toFormatString(pState->formats() , ",").c_str()); 336 { 337 bool fSetError = true; /* Whether to set an error and reset or not. */ 338 339 /* 340 * HACK ALERT: As we now expose an error (via i_setErrorAndReset(), see below) back to the API client, we 341 * have to add a kludge here. Older X11-based Guest Additions report "TARGETS, MULTIPLE" back 342 * to us, even if they don't offer any other *supported* formats of the host. This then in turn 343 * would lead to exposing an error, whereas we just should ignore those specific X11-based 344 * formats. For anything other we really want to be notified by setting an error though. 345 */ 346 if ( lstGuest.size() == 2 347 && GuestDnD::isFormatInFormatList("TARGETS", lstGuest) 348 && GuestDnD::isFormatInFormatList("MULTIPLE", lstGuest)) 349 { 350 fSetError = false; 351 } 352 /* HACK ALERT END */ 353 354 if (fSetError) 355 hrc = i_setErrorAndReset(tr("Negotiation of formats between guest and host failed!\n\nHost offers: %s\n\nGuest offers: %s"), 356 GuestDnD::toFormatString(m_lstFmtSupported , ",").c_str(), 357 GuestDnD::toFormatString(pState->formats() , ",").c_str()); 358 else /* Just silently reset. */ 359 i_reset(); 360 } 338 361 } 339 362 /* Note: Don't report an error here when the action is "ignore" -- that only means that the current window on the guest
Note:
See TracChangeset
for help on using the changeset viewer.