VirtualBox

Changeset 89741 in vbox


Ignore:
Timestamp:
Jun 16, 2021 1:38:35 PM (3 years ago)
Author:
vboxsync
Message:

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r89728 r89741  
    71127112   TEMPLATE_VBOXQTGUIEXE_LDFLAGS += -IntegrityCheck
    71137113  endif
     7114  TEMPLATE_VBOXQTGUIEXE_LDFLAGS += -Wl,-rpath,$(PATH_SDK_QT5_LIB)
     7115
    71147116  TEMPLATE_VBOXQTGUIEXE_SDKS += $(VBOX_WINPSDK)
    71157117  if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
     
    71867188  ifeq ($(KBUILD_TARGET),linux)
    71877189   TEMPLATE_VBOXQTGUIEXE_LDFLAGS += -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed)
     7190   TEMPLATE_VBOXQTGUIEXE_LDFLAGS += -Wl,-rpath,$(PATH_SDK_QT5_LIB)
    71887191   TEMPLATE_VBOXQTGUIEXE_LIBS += \
    71897192     $(VBOX_XCURSOR_LIBS) \
  • 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