VirtualBox

Changeset 55133 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 8, 2015 1:12:53 PM (10 years ago)
Author:
vboxsync
Message:

Main,Frontends: framebuffer identifier.

Location:
trunk/src/VBox/Frontends
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r53624 r55133  
    208208static ULONG       gcMonitors = 1;
    209209static ComObjPtr<VBoxSDLFB> gpFramebuffer[64];
     210static Bstr gaFramebufferId[64];
    210211static SDL_Cursor *gpDefaultCursor = NULL;
    211212#ifdef VBOXSDL_WITH_X11
     
    20082009    {
    20092010        // register our framebuffer
    2010         rc = gpDisplay->AttachFramebuffer(i, gpFramebuffer[i]);
     2011        rc = gpDisplay->AttachFramebuffer(i, gpFramebuffer[i], gaFramebufferId[i].asOutParam());
    20112012        if (FAILED(rc))
    20122013        {
     
    30283029    {
    30293030        for (unsigned i = 0; i < gcMonitors; i++)
    3030             gpDisplay->DetachFramebuffer(i);
     3031            gpDisplay->DetachFramebuffer(i, gaFramebufferId[i].raw());
    30313032    }
    30323033
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r55113 r55133  
    381381     CComPtr <IUnknown> m_pUnkMarshaler;
    382382#endif /* Q_OS_WIN */
     383     /** Identifier returned by AttachFramebuffer. Used in DetachFramebuffer. */
     384     QString m_strFramebufferId;
    383385};
    384386
     
    599601void UIFrameBufferPrivate::attach()
    600602{
    601     display().AttachFramebuffer(m_uScreenId, CFramebuffer(this));
     603    m_strFramebufferId = display().AttachFramebuffer(m_uScreenId, CFramebuffer(this));
    602604}
    603605
     
    606608    CFramebuffer frameBuffer = display().QueryFramebuffer(m_uScreenId);
    607609    if (!frameBuffer.isNull())
    608         display().DetachFramebuffer(m_uScreenId);
     610    {
     611        display().DetachFramebuffer(m_uScreenId, m_strFramebufferId);
     612        m_strFramebufferId.clear();
     613    }
    609614}
    610615
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