VirtualBox

Ignore:
Timestamp:
Jun 16, 2021 1:38:35 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145192
Message:

FE/Qt: bugref:3355. Re-activate screen saver during vm poweroff.

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

Legend:

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

    r89740 r89741  
    28472847    sltCloseGuestControlConsoleDialog();
    28482848#endif
     2849    activateScreenSaver();
    28492850    sltCloseFileManagerDialog();
    28502851    sltCloseVMInformationDialog();
     
    33343335}
    33353336
     3337void UIMachineLogic::activateScreenSaver()
     3338{
     3339    /* Do nothing if we did not de-activated the host screen saver: */
     3340    if (!gEDataManager->disableHostScreenSaver())
     3341        return;
     3342
     3343    QVector<CMachine> machines = uiCommon().virtualBox().GetMachines();
     3344    bool fAnother = false;
     3345    for (int i = 0; i < machines.size(); ++i)
     3346    {
     3347        if (machines[i].GetState() == KMachineState_Running && machines[i].GetId() != machine().GetId())
     3348        {
     3349            fAnother = true;
     3350            break;
     3351        }
     3352    }
     3353
     3354    /* Do nothing if there are other vms running.*/
     3355    if (fAnother)
     3356        return;
     3357    sltDisableHostScreenSaverStateChanged(false);
     3358}
     3359
    33363360#ifdef VBOX_WITH_DEBUGGER_GUI
    33373361bool UIMachineLogic::dbgCreated()
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r89712 r89741  
    399399    void takeScreenshot(const QString &strFile, const QString &strFormat /* = "png" */) const;
    400400
     401    /** Reactivates the screen saver. This is possbily called during vm window close and enables host screen
     402      * if there are no other vms running at the moment. */
     403    void activateScreenSaver();
     404
    401405    /* Private variables: */
    402406    UISession *m_pSession;
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