VirtualBox

Changeset 73947 in vbox for trunk


Ignore:
Timestamp:
Aug 29, 2018 12:28:34 PM (6 years ago)
Author:
vboxsync
Message:

DnD/VBoxTray: Added a "started" indicator for the proxy window creation and check for it on startup.

Location:
trunk/src/VBox/Additions/WINNT/VBoxTray
Files:
2 edited

Legend:

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

    r73945 r73947  
    142142                            "dndwnd"); /** @todo Include ID if there's more than one proxy window. */
    143143        if (RT_SUCCESS(rc))
    144             rc = RTThreadUserWait(hThread, 30 * 1000 /* Timeout in ms */);
     144        {
     145            int rc2 = RTThreadUserWait(hThread, 30 * 1000 /* Timeout in ms */);
     146            AssertRC(rc2);
     147
     148            if (!pCtx->fStarted) /* Did the thread fail to start? */
     149                rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
     150        }
    145151    }
    146152
     
    290296#ifdef VBOX_WITH_DRAG_AND_DROP_GH
    291297        rc = pThis->RegisterAsDropTarget();
    292 #else
    293         rc = VINF_SUCCESS;
    294298#endif
    295299    }
     
    300304    }
    301305
    302     bool fSignalled = false;
    303 
    304306    if (RT_SUCCESS(rc))
    305     {
    306         rc = RTThreadUserSignal(hThread);
    307         fSignalled = RT_SUCCESS(rc);
    308 
     307        pCtx->fStarted = true; /* Set started indicator on success. */
     308
     309    int rc2 = RTThreadUserSignal(hThread);
     310    bool fSignalled = RT_SUCCESS(rc2);
     311
     312    if (RT_SUCCESS(rc))
     313    {
    309314        bool fShutdown = false;
    310315        for (;;)
     
    332337
    333338#ifdef VBOX_WITH_DRAG_AND_DROP_GH
    334         int rc2 = pThis->UnregisterAsDropTarget();
     339        rc2 = pThis->UnregisterAsDropTarget();
    335340        if (RT_SUCCESS(rc))
    336341            rc = rc2;
     
    341346    if (!fSignalled)
    342347    {
    343         int rc2 = RTThreadUserSignal(hThread);
     348        rc2 = RTThreadUserSignal(hThread);
    344349        AssertRC(rc2);
    345350    }
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.h

    r69500 r73947  
    55
    66/*
    7  * Copyright (C) 2013-2017 Oracle Corporation
     7 * Copyright (C) 2013-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    229229    /** Pointer to the service environment. */
    230230    const VBOXSERVICEENV      *pEnv;
     231    /** Started indicator. */
     232    bool                       fStarted;
    231233    /** Shutdown indicator. */
    232234    bool                       fShutdown;
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