Changeset 89741 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 16, 2021 1:38:35 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145192
- 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 2847 2847 sltCloseGuestControlConsoleDialog(); 2848 2848 #endif 2849 activateScreenSaver(); 2849 2850 sltCloseFileManagerDialog(); 2850 2851 sltCloseVMInformationDialog(); … … 3334 3335 } 3335 3336 3337 void 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 3336 3360 #ifdef VBOX_WITH_DEBUGGER_GUI 3337 3361 bool UIMachineLogic::dbgCreated() -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r89712 r89741 399 399 void takeScreenshot(const QString &strFile, const QString &strFormat /* = "png" */) const; 400 400 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 401 405 /* Private variables: */ 402 406 UISession *m_pSession;
Note:
See TracChangeset
for help on using the changeset viewer.