VirtualBox

Ignore:
Timestamp:
Jun 29, 2020 11:34:28 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9774: Runtime UI: Handling for Visual State change coming from extra-data.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r84790 r84990  
    46274627                 strKey == GUI_StatusBar_IndicatorOrder)
    46284628            emit sigStatusBarConfigurationChange(uMachineID);
     4629        /* Visual state change: */
     4630        else if (strKey == GUI_Fullscreen ||
     4631                 strKey == GUI_Seamless ||
     4632                 strKey == GUI_Scale)
     4633            emit sigVisualStateChange(uMachineID);
    46294634        /* Scale-factor change: */
    46304635        else if (strKey == GUI_ScaleFactor)
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r84790 r84990  
    8080    /** Notifies about VirtualBox Manager / Details pane options change. */
    8181    void sigDetailsOptionsChange(DetailsElementType enmType);
     82
     83    /** Notifies about visual state change. */
     84    void sigVisualStateChange(const QUuid &uMachineID);
    8285
    8386    /** Notifies about menu-bar configuration change. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r82968 r84990  
    166166        /* Remember new visual state: */
    167167        m_visualState = visualState;
     168
     169        /* Save requested visual state: */
     170        gEDataManager->setRequestedVisualState(m_visualState, uiCommon().managedVMUuid());
    168171    }
    169172    else
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r84696 r84990  
    12091209}
    12101210
     1211void UIMachineLogic::prepareOtherConnections()
     1212{
     1213    /* Extra-data connections: */
     1214    connect(gEDataManager, &UIExtraDataManager::sigVisualStateChange,
     1215            this, &UIMachineLogic::sltHandleVisualStateChange);
     1216}
     1217
    12111218void UIMachineLogic::prepareHandlers()
    12121219{
     
    27322739}
    27332740
     2741void UIMachineLogic::sltHandleVisualStateChange()
     2742{
     2743    /* Check for new requested value stored in extra-data: */
     2744    const UIVisualStateType enmRequestedState = gEDataManager->requestedVisualState(uiCommon().managedVMUuid());
     2745    /* Check whether current value OR old requested value differs from new requested one.
     2746     * That way we will NOT enter seamless mode instantly if it is already planned
     2747     * but is not entered because we're waiting for a guest addition permission. */
     2748    if (   visualStateType() != enmRequestedState
     2749        && uisession()->requestedVisualState() != enmRequestedState)
     2750    {
     2751        switch (enmRequestedState)
     2752        {
     2753            case UIVisualStateType_Normal: return sltChangeVisualStateToNormal();
     2754            case UIVisualStateType_Fullscreen: return sltChangeVisualStateToFullscreen();
     2755            case UIVisualStateType_Seamless: return sltChangeVisualStateToSeamless();
     2756            case UIVisualStateType_Scale: return sltChangeVisualStateToScale();
     2757            default: break;
     2758        }
     2759    }
     2760}
     2761
    27342762void UIMachineLogic::typeHostKeyComboPressRelease(bool fToggleSequence)
    27352763{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r82968 r84990  
    227227    virtual void prepareActionGroups();
    228228    virtual void prepareActionConnections();
    229     virtual void prepareOtherConnections() {}
     229    virtual void prepareOtherConnections();
    230230    virtual void prepareHandlers();
    231231    virtual void prepareMachineWindows() = 0;
     
    353353    void sltCloseRuntimeUI() { closeRuntimeUI(); }
    354354
     355    /** Handles request for visual state change. */
     356    void sltHandleVisualStateChange();
     357
    355358private:
    356359
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