VirtualBox

Changeset 47103 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 11, 2013 3:52:27 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Popup-center: Process Notify3DEvent frame-buffer callback.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp

    r47091 r47103  
    272272    pPopupStack->hide();
    273273    unassignPopupStackParent(pPopupStack, pParent);
     274}
     275
     276void UIPopupCenter::raisePopupStack(QWidget *pParent)
     277{
     278    /* Make sure passed parent is valid: */
     279    if (!pParent)
     280    {
     281        AssertMsgFailed(("Passed parent is NULL"));
     282        return;
     283    }
     284
     285    /* Do we have a stack for passed parent? */
     286    const QString strPopupStackID(popupStackID(pParent));
     287    if (!m_stacks.contains(strPopupStackID))
     288        return;
     289
     290    /* Just raise, its:
     291     * useful for Win host,
     292     * do not work on Mac host and
     293     * need to check for x11/KDE still. */
     294    UIPopupStack *pPopupStack = m_stacks[strPopupStackID];
     295    pPopupStack->raise();
    274296}
    275297
     
    346368}
    347369
     370void UIPopupCenter::sltRaisePopupStack()
     371{
     372    raisePopupStack(vboxGlobal().activeMachineWindow());
     373}
     374
    348375void UIPopupCenter::sltRemovePopupStack()
    349376{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h

    r47091 r47103  
    111111    void sltShowPopupStack();
    112112    void sltHidePopupStack();
     113    void sltRaisePopupStack();
    113114    void sltRemovePopupStack();
    114115
     
    133134    void showPopupStack(QWidget *pParent);
    134135    void hidePopupStack(QWidget *pParent);
     136    void raisePopupStack(QWidget *pParent);
    135137    void assignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent);
    136138    void unassignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r47073 r47103  
    347347    {
    348348        case VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_WINDOW:
     349        {
    349350            if (pReserved)
    350351                return E_INVALIDARG;
    351352
    352             /* @todo: submit asynchronous event to GUI thread */
    353             return E_NOTIMPL;
     353            /* Notify GUI about 3D event: */
     354            emit sigNotify3DEvent();
     355
     356            return S_OK;
     357        }
    354358        default:
    355359            return E_INVALIDARG;
     
    423427            m_pMachineView, SLOT(sltHandleSetVisibleRegion(QRegion)),
    424428            Qt::QueuedConnection);
     429    connect(this, SIGNAL(sigNotify3DEvent()),
     430            m_pMachineView, SLOT(sltNotify3DEvent()),
     431            Qt::QueuedConnection);
    425432}
    426433
     
    433440    disconnect(this, SIGNAL(sigSetVisibleRegion(QRegion)),
    434441               m_pMachineView, SLOT(sltHandleSetVisibleRegion(QRegion)));
    435 }
    436 
     442    disconnect(this, SIGNAL(sigNotify3DEvent()),
     443               m_pMachineView, SLOT(sltNotify3DEvent()));
     444}
     445
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r47067 r47103  
    9999    void sigNotifyUpdate(int iX, int iY, int iWidth, int iHeight);
    100100    void sigSetVisibleRegion(QRegion region);
     101    void sigNotify3DEvent();
    101102
    102103public:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r47101 r47103  
    351351}
    352352
     353void UIMachineLogic::notifyAbout3DEvent()
     354{
     355    /* Notify listener about 3D event: */
     356    emit sigNotify3DEvent();
     357}
     358
    353359void UIMachineLogic::sltMachineStateChanged()
    354360{
     
    539545    connect(this, SIGNAL(sigMachineWindowsDestroyed()),
    540546            &popupCenter(), SLOT(sltHidePopupStack()));
     547    connect(this, SIGNAL(sigNotify3DEvent()),
     548            &popupCenter(), SLOT(sltRaisePopupStack()));
    541549}
    542550
     
    548556    disconnect(this, SIGNAL(sigMachineWindowsDestroyed()),
    549557               &popupCenter(), SLOT(sltHidePopupStack()));
     558    disconnect(this, SIGNAL(sigNotify3DEvent()),
     559               &popupCenter(), SLOT(sltRaisePopupStack()));
    550560}
    551561
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r46976 r47103  
    5858    void sigMachineWindowsCreated();
    5959    void sigMachineWindowsDestroyed();
     60    void sigNotify3DEvent();
    6061
    6162public:
     
    99100    void shutdown();
    100101    void powerOff(bool fDiscardingState);
     102
     103    /* API: 3D event stuff: */
     104    void notifyAbout3DEvent();
    101105
    102106protected slots:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r46538 r47103  
    289289    /* Used only in seamless-mode. */
    290290    Q_UNUSED(region);
     291}
     292
     293void UIMachineView::sltNotify3DEvent()
     294{
     295    machineLogic()->notifyAbout3DEvent();
    291296}
    292297
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r46364 r47103  
    102102    /* Handler: Frame-buffer SetVisibleRegion stuff: */
    103103    virtual void sltHandleSetVisibleRegion(QRegion region);
     104
     105    /* Handler: Frame-buffer Notify3DEvent stuff: */
     106    virtual void sltNotify3DEvent();
    104107
    105108    /* Watch dog for desktop resizes: */
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