Changeset 89740 in vbox
- Timestamp:
- Jun 16, 2021 1:18:15 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r89704 r89740 4743 4743 else if (strKey == GUI_CloudConsoleManager_Restrictions) 4744 4744 emit sigCloudConsoleManagerRestrictionChange(); 4745 #if def VBOX_WS_X114745 #if defined(VBOX_WS_X11) || defined(VBOX_WS_WIN) 4746 4746 else if (strKey == GUI_DisableHostScreenSaver) 4747 4747 emit sigDisableHostScreenSaverStateChange(isFeatureAllowed(GUI_DisableHostScreenSaver)); -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r89700 r89740 116 116 #endif /* VBOX_WS_MAC */ 117 117 118 #if def VBOX_WS_X11118 #if defined (VBOX_WS_X11) || defined (VBOX_WS_WIN) 119 119 /* Is emitted when host screen saver inhibition state changes. */ 120 120 void sigDisableHostScreenSaverStateChange(bool fDisable); -
trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp
r85121 r89740 75 75 } 76 76 77 const void NativeWindowSubsystem::setScreenSaverActive(BOOL fDisableScreenSaver) 78 { 79 BOOL fIsActive; 80 SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &fIsActive, 0); 81 if (fIsActive == !fDisableScreenSaver) 82 return; 83 //printf("before %d\n", fIsActive); 84 85 SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, !fDisableScreenSaver, NULL, 0); 86 87 SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &fIsActive, 0); 88 /*if (fIsActive == !fDisableScreenSaver) 89 printf("success %d %d\n", fIsActive, fDisableScreenSaver); 90 */ 91 } 92 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h
r82968 r89740 36 36 /* Returns area covered by visible always-on-top (top-most) windows: */ 37 37 SHARED_LIBRARY_STUFF const QRegion areaCoveredByTopMostWindows(); 38 SHARED_LIBRARY_STUFF const void setScreenSaverActive(BOOL fDisableScreenSaver); 38 39 } 39 40 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r89712 r89740 108 108 #ifdef VBOX_WS_WIN 109 109 # include "WinKeyboard.h" 110 # include "VBoxUtils-win.h" 110 111 #endif 111 112 #ifdef VBOX_WS_X11 … … 725 726 else 726 727 X11UninhibitScrenSaver(m_screenSaverInhibitionCookies); 727 728 #elif defined(VBOX_WS_WIN) 729 NativeWindowSubsystem::setScreenSaverActive(fDisabled); 728 730 #else 729 731 Q_UNUSED(fDisabled); … … 1510 1512 sltSwitchKeyboardLedsToGuestLeds(); 1511 1513 /* */ 1512 #if defined(VBOX_WS_X11) 1514 #if defined(VBOX_WS_X11) || defined(VBOX_WS_WIN) 1513 1515 connect(gEDataManager, &UIExtraDataManager::sigDisableHostScreenSaverStateChange, 1514 1516 this, &UIMachineLogic::sltDisableHostScreenSaverStateChanged);
Note:
See TracChangeset
for help on using the changeset viewer.