VirtualBox

Ignore:
Timestamp:
Jul 26, 2007 1:41:47 PM (17 years ago)
Author:
vboxsync
Message:

Turn off screensaver when enabling seamless mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxService/VBoxSeamless.cpp

    r3811 r3876  
    131131    VBoxGuestFilterMaskInfo maskInfo;
    132132    DWORD cbReturned;
     133    BOOL fWasScreenSaverActive = FALSE, ret;
    133134
    134135    maskInfo.u32OrMask = VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST;
     
    185186                        {
    186187                        case VMMDev_Seamless_Disabled:
     188                            if (fWasScreenSaverActive)
     189                            {
     190                                ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, NULL, 0);
     191                                if (!ret)
     192                                    dprintf(("SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
     193                            }
    187194                            PostMessage(gToolWindow, WM_VBOX_REMOVE_SEAMLESS_HOOK, 0, 0);
    188195                            break;
    189196
    190197                        case VMMDev_Seamless_Visible_Region:
     198                            ret = SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &fWasScreenSaverActive, 0);
     199                            if (!ret)
     200                                dprintf(("SystemParametersInfo SPI_GETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
     201
     202                            ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0);
     203                            if (!ret)
     204                                dprintf(("SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
    191205                            PostMessage(gToolWindow, WM_VBOX_INSTALL_SEAMLESS_HOOK, 0, 0);
    192206                            break;
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