VirtualBox

Changeset 81700 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 6, 2019 11:03:13 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/clipboard-x11: Removed obsolete VBOX_AFTER_5_2 define and associated code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r81699 r81700  
    6464*   Defined Constants And Macros                                                                                                 *
    6565*********************************************************************************************************************************/
    66 /* The serialisation mechanism looks like it is not needed (everything using it
    67  * runs on one thread, and the flag is always cleared at the end of calls which
    68  * 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_2
    71 #endif
    7266
    7367
     
    267261    /** The first XFixes event number */
    268262    int fixesEventBase;
    269 #ifndef VBOX_AFTER_5_2
    270     /** The Xt Intrinsics can only handle one outstanding clipboard operation
    271      * 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 remember
    274      * it for later. */
    275     bool fUpdateNeeded;
    276 #endif
    277263};
    278264
     
    671657{
    672658    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
    683660    if (pTargets == NULL)
    684661    {
     
    687664        return;
    688665    }
     666
    689667    clipGetFormatsFromTargets(pCtx, pTargets, cTargets);
    690668    clipReportFormatsToVBox(pCtx);
     
    775753{
    776754    LogFlowFuncEnter();
    777 
    778 #ifndef VBOX_AFTER_5_2
    779     if (pCtx->fBusy)
    780     {
    781         pCtx->fUpdateNeeded = true;
    782         return;
    783     }
    784     pCtx->fBusy = true;
    785 #endif
    786755
    787756#ifndef TESTCASE
     
    19891958{
    19901959    CLIPREADX11CBREQ *pReq = (CLIPREADX11CBREQ *) pClient;
     1960
    19911961    LogFlowFunc(("pReq->mFormat=%02X, pReq->mTextFormat=%u, "
    19921962                 "pReq->mBitmapFormat=%u, pReq->mHtmlFormat=%u, pReq->mCtx=%p\n",
    19931963                 pReq->mFormat, pReq->mTextFormat, pReq->mBitmapFormat,
    19941964                 pReq->mHtmlFormat, pReq->mCtx));
     1965
    19951966    AssertPtr(pReq->mCtx);
    19961967    Assert(pReq->mFormat != 0);  /* sanity */
     1968
    19971969    int rc = VINF_SUCCESS;
    1998 #ifndef VBOX_AFTER_5_2
    1999     CLIPBACKEND *pCtx = pReq->mCtx;
    2000 #endif
     1970
    20011971    void *pvDest = NULL;
    20021972    uint32_t cbDest = 0;
    20031973
    2004 #ifndef VBOX_AFTER_5_2
    2005     pCtx->fBusy = false;
    2006     if (pCtx->fUpdateNeeded)
    2007         clipQueryX11CBFormats(pCtx);
    2008 #endif
    20091974    if (pvSrc == NULL)
     1975    {
    20101976        /* The clipboard selection may have changed before we could get it. */
    20111977        rc = VERR_NO_DATA;
     1978    }
    20121979    else if (pReq->mFormat == VBOX_SHCL_FMT_UNICODETEXT)
    20131980    {
     
    21862153    int rc = VERR_NO_DATA; /* VBox thinks we have data and we don't. */
    21872154
    2188 #ifndef VBOX_AFTER_5_2
    2189     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     else
    2197 #endif
    21982155    if (pReq->mFormat == VBOX_SHCL_FMT_UNICODETEXT)
    21992156    {
     
    22372194    {
    22382195        rc = VERR_NOT_IMPLEMENTED;
    2239 #ifndef VBOX_AFTER_5_2
    2240         pCtx->fBusy = false;
    2241 #endif
    22422196    }
    22432197
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette