VirtualBox

Changeset 51525 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 4, 2014 8:32:22 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94154
Message:

DisplayImpl: notify framebuffer about VM shutdown.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r51476 r51525  
    215215    void VideoCaptureStop();
    216216    int  VideoCaptureEnableScreens(ComSafeArrayIn(BOOL, aScreens));
     217
     218    void notifyPowerDown(void);
    217219
    218220    // IEventListener methods
     
    331333    DISPLAYFBINFO maFramebuffers[SchemaDefs::MaxGuestMonitors];
    332334
     335    bool mfSourceBitmapEnabled;
     336
    333337    /* arguments of the last handleDisplayResize() call */
    334338    void       *mLastAddress;
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r51476 r51525  
    73507350     * safe to release the object lock now if needed)
    73517351     * ---------------------------------------------------------------------- */
     7352
     7353    if (mDisplay)
     7354    {
     7355        alock.release();
     7356
     7357        mDisplay->notifyPowerDown();
     7358
     7359        alock.acquire();
     7360    }
    73527361
    73537362    /* Stop the VRDP server to prevent new clients connection while VM is being
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r51513 r51525  
    597597
    598598    unconst(mParent) = aParent;
     599
     600    mfSourceBitmapEnabled = true;
    599601
    600602    ULONG ul;
     
    23662368}
    23672369
     2370void Display::notifyPowerDown(void)
     2371{
     2372    LogRelFlowFunc(("\n"));
     2373
     2374    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     2375
     2376    /* Source bitmaps are not available anymore. */
     2377    mfSourceBitmapEnabled = false;
     2378
     2379    /* Resize all displays to tell framebuffers to forget current source bitmap. */
     2380    unsigned uScreenId = mcMonitors;
     2381    while (uScreenId > 0)
     2382    {
     2383        --uScreenId;
     2384
     2385        DISPLAYFBINFO *pFBInfo = &maFramebuffers[uScreenId];
     2386        if (!pFBInfo->fDisabled)
     2387        {
     2388            handleDisplayResize(uScreenId, 32,
     2389                                NULL,
     2390                                0,
     2391                                pFBInfo->w,
     2392                                pFBInfo->h,
     2393                                0);
     2394        }
     2395    }
     2396}
     2397
    23682398// IDisplay methods
    23692399/////////////////////////////////////////////////////////////////////////////
     
    37283758{
    37293759    HRESULT hr = S_OK;
     3760
     3761    if (!mfSourceBitmapEnabled)
     3762    {
     3763        *ppDisplaySourceBitmap = NULL;
     3764        return E_FAIL;
     3765    }
    37303766
    37313767    DISPLAYFBINFO *pFBInfo = &maFramebuffers[aScreenId];
Note: See TracChangeset for help on using the changeset viewer.

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