VirtualBox

Ignore:
Timestamp:
Sep 20, 2018 10:02:42 AM (6 years ago)
Author:
vboxsync
Message:

DnD: Added VBGLR3DNDEVENTTYPE to abstract the DnD protocol from the actual DnD events more; that way the client don't need to know exactly how the actual protocol works, but only react on events they care for.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnDDataObject.cpp

    r69500 r74380  
    8989    if (SUCCEEDED(hr))
    9090    {
    91         int rc2 = RTSemEventCreate(&mSemEvent);
     91        int rc2 = RTSemEventCreate(&mEventDropped);
    9292        AssertRC(rc2);
    9393
     
    208208    if (mStatus == Dropping)
    209209    {
    210         LogFlowFunc(("Waiting for event ...\n"));
    211         int rc2 = RTSemEventWait(mSemEvent, RT_INDEFINITE_WAIT);
    212         LogFlowFunc(("rc2=%Rrc, mStatus=%ld\n", rc2, mStatus)); NOREF(rc2);
     210        LogRel2(("DnD: Waiting for drop event ...\n"));
     211        int rc2 = RTSemEventWait(mEventDropped, RT_INDEFINITE_WAIT);
     212        LogFlowFunc(("rc2=%Rrc, mStatus=%ld\n", rc2, mStatus)); RT_NOREF(rc2);
    213213    }
    214214
    215215    if (mStatus == Dropped)
    216216    {
     217        LogRel2(("DnD: Drop event received\n"));
    217218        LogRel3(("DnD: cfFormat=%RI16, sFormat=%s, tyMed=%RU32, dwAspect=%RU32\n",
    218219                 pThisFormat->cfFormat, VBoxDnDDataObject::ClipboardFormatToString(pFormatEtc->cfFormat),
     
    517518    LogFlowFunc(("Aborting ...\n"));
    518519    mStatus = Aborted;
    519     return RTSemEventSignal(mSemEvent);
     520    return RTSemEventSignal(mEventDropped);
    520521}
    521522
     
    674675                              const void *pvData, uint32_t cbData)
    675676{
    676     LogFlowFunc(("Signalling ...\n"));
    677 
    678677    int rc;
    679678
    680     mStatus = Dropped;
    681     mstrFormat = strFormat;
    682679    if (cbData)
    683680    {
     
    695692        rc = VINF_SUCCESS;
    696693
    697     if (RT_FAILURE(rc))
     694    if (RT_SUCCESS(rc))
     695    {
     696        mStatus    = Dropped;
     697        mstrFormat = strFormat;
     698    }
     699    else
     700    {
    698701        mStatus = Aborted;
     702    }
    699703
    700704    /* Signal in any case. */
    701     int rc2 = RTSemEventSignal(mSemEvent);
     705    LogRel2(("DnD: Signalling drop event\n"));
     706
     707    int rc2 = RTSemEventSignal(mEventDropped);
    702708    if (RT_SUCCESS(rc))
    703709        rc = rc2;
    704710
     711    LogFunc(("mStatus=%RU32, rc=%Rrc\n", mStatus, rc));
    705712    return rc;
    706713}
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