VirtualBox

Changeset 98839 in vbox


Ignore:
Timestamp:
Mar 6, 2023 12:20:33 PM (21 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: Reworking UIFrameBuffer stuff; Reusing some of existing code in init procedure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r98838 r98839  
    556556private:
    557557
    558 #ifdef Q_OS_WIN
     558#ifdef VBOX_WS_WIN
    559559     ComPtr<IUnknown> m_pUnkMarshaler;
    560 #endif /* Q_OS_WIN */
     560#endif
    561561     /** Identifier returned by AttachFramebuffer. Used in DetachFramebuffer. */
    562562     QUuid m_uFramebufferId;
     
    11061106    LogRel2(("GUI: UIFrameBufferPrivate::init %p\n", this));
    11071107
    1108     /* Assign mahine-view: */
    1109     m_pMachineView = pMachineView;
    1110 
    1111     /* Assign index: */
    1112     m_uScreenId = m_pMachineView->screenId();
    1113 
    1114     /* Cache window ID: */
    1115     m_iWinId = (m_pMachineView && m_pMachineView->viewport()) ? (LONG64)m_pMachineView->viewport()->winId() : 0;
    1116 
    1117 #ifdef VBOX_WS_X11
    1118     /* Sync Qt and X11 Server (see xTracker #7547). */
    1119     XSync(NativeWindowSubsystem::X11GetDisplay(), false);
    1120 #endif
     1108    /* Fetch passed view: */
     1109    setView(pMachineView);
    11211110
    11221111    /* Assign display: */
    1123     m_comDisplay = m_pMachineView->uisession()->display();
     1112    m_comDisplay = m_pMachineView->uimachine()->uisession()->display();
    11241113
    11251114    /* Initialize critical-section: */
     
    11271116    AssertRC(rc);
    11281117
    1129     /* Connect handlers: */
    1130     if (m_pMachineView)
    1131         prepareConnections();
    1132 
    1133 #ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    1134     /* Decide if we are going to use GL to draw the guest screen: */
    1135     if (isGLWidgetSupported())
    1136         m_pGLWidget = new GLWidget(m_pMachineView->viewport(), this);
    1137 #endif
    1138 
    11391118    /* Resize/rescale frame-buffer to the default size: */
    11401119    performResize(640, 480);
    11411120    performRescale();
    11421121
    1143 #ifdef Q_OS_WIN
     1122#ifdef VBOX_WS_WIN
    11441123    CoCreateFreeThreadedMarshaler(this, m_pUnkMarshaler.asOutParam());
    1145 #endif /* Q_OS_WIN */
     1124#endif
     1125
    11461126    return S_OK;
    11471127}
     
    11671147    /* Reassign machine-view: */
    11681148    m_pMachineView = pMachineView;
     1149    /* Reassign index: */
     1150    m_uScreenId = m_pMachineView ? m_pMachineView->screenId() : 0;
    11691151    /* Recache window ID: */
    11701152    m_iWinId = (m_pMachineView && m_pMachineView->viewport()) ? (LONG64)m_pMachineView->viewport()->winId() : 0;
    11711153
    11721154#ifdef VBOX_WS_X11
    1173     /* Sync Qt and X11 Server (see xTracker #7547). */
     1155    /* Resync Qt and X11 Server (see xTracker #7547). */
    11741156    XSync(NativeWindowSubsystem::X11GetDisplay(), false);
    11751157#endif
    11761158
    1177     /* Connect new handlers: */
     1159    /* Reconnect new handlers: */
    11781160    if (m_pMachineView)
    11791161        prepareConnections();
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