Changeset 81700 in vbox for trunk/src/VBox
- Timestamp:
- Nov 6, 2019 11:03:13 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r81699 r81700 64 64 * Defined Constants And Macros * 65 65 *********************************************************************************************************************************/ 66 /* The serialisation mechanism looks like it is not needed (everything using it67 * runs on one thread, and the flag is always cleared at the end of calls which68 * use it). So we will remove it after the 5.2 series. */69 #if (VBOX_VERSION_MAJOR * 100000 + VBOX_VERSION_MINOR * 1000 + VBOX_VERION_BUILD >= 502051)70 # define VBOX_AFTER_5_271 #endif72 66 73 67 … … 267 261 /** The first XFixes event number */ 268 262 int fixesEventBase; 269 #ifndef VBOX_AFTER_5_2270 /** The Xt Intrinsics can only handle one outstanding clipboard operation271 * at a time, so we keep track of whether one is in process. */272 bool fBusy;273 /** We can't handle a clipboard update event while we are busy, so remember274 * it for later. */275 bool fUpdateNeeded;276 #endif277 263 }; 278 264 … … 671 657 { 672 658 LogFlowFuncEnter(); 673 #ifndef VBOX_AFTER_5_2 674 pCtx->fBusy = false; 675 if (pCtx->fUpdateNeeded) 676 { 677 /* We may already be out of date. */ 678 pCtx->fUpdateNeeded = false; 679 clipQueryX11CBFormats(pCtx); 680 return; 681 } 682 #endif 659 683 660 if (pTargets == NULL) 684 661 { … … 687 664 return; 688 665 } 666 689 667 clipGetFormatsFromTargets(pCtx, pTargets, cTargets); 690 668 clipReportFormatsToVBox(pCtx); … … 775 753 { 776 754 LogFlowFuncEnter(); 777 778 #ifndef VBOX_AFTER_5_2779 if (pCtx->fBusy)780 {781 pCtx->fUpdateNeeded = true;782 return;783 }784 pCtx->fBusy = true;785 #endif786 755 787 756 #ifndef TESTCASE … … 1989 1958 { 1990 1959 CLIPREADX11CBREQ *pReq = (CLIPREADX11CBREQ *) pClient; 1960 1991 1961 LogFlowFunc(("pReq->mFormat=%02X, pReq->mTextFormat=%u, " 1992 1962 "pReq->mBitmapFormat=%u, pReq->mHtmlFormat=%u, pReq->mCtx=%p\n", 1993 1963 pReq->mFormat, pReq->mTextFormat, pReq->mBitmapFormat, 1994 1964 pReq->mHtmlFormat, pReq->mCtx)); 1965 1995 1966 AssertPtr(pReq->mCtx); 1996 1967 Assert(pReq->mFormat != 0); /* sanity */ 1968 1997 1969 int rc = VINF_SUCCESS; 1998 #ifndef VBOX_AFTER_5_2 1999 CLIPBACKEND *pCtx = pReq->mCtx; 2000 #endif 1970 2001 1971 void *pvDest = NULL; 2002 1972 uint32_t cbDest = 0; 2003 1973 2004 #ifndef VBOX_AFTER_5_22005 pCtx->fBusy = false;2006 if (pCtx->fUpdateNeeded)2007 clipQueryX11CBFormats(pCtx);2008 #endif2009 1974 if (pvSrc == NULL) 1975 { 2010 1976 /* The clipboard selection may have changed before we could get it. */ 2011 1977 rc = VERR_NO_DATA; 1978 } 2012 1979 else if (pReq->mFormat == VBOX_SHCL_FMT_UNICODETEXT) 2013 1980 { … … 2186 2153 int rc = VERR_NO_DATA; /* VBox thinks we have data and we don't. */ 2187 2154 2188 #ifndef VBOX_AFTER_5_22189 bool fBusy = pCtx->fBusy;2190 pCtx->fBusy = true;2191 if (fBusy)2192 {2193 /* If the clipboard is busy just fend off the request. */2194 rc = VERR_TRY_AGAIN;2195 }2196 else2197 #endif2198 2155 if (pReq->mFormat == VBOX_SHCL_FMT_UNICODETEXT) 2199 2156 { … … 2237 2194 { 2238 2195 rc = VERR_NOT_IMPLEMENTED; 2239 #ifndef VBOX_AFTER_5_22240 pCtx->fBusy = false;2241 #endif2242 2196 } 2243 2197
Note:
See TracChangeset
for help on using the changeset viewer.