VirtualBox

Changeset 89712 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jun 15, 2021 3:09:18 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145160
Message:

FE/Qt: bugref:9930. Making necessary connections for Linux screen saver disabling

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp

    r89708 r89712  
    175175            serviceNames << strServiceName;
    176176    }
     177    if (serviceNames.isEmpty())
     178        LogRel(("No screen saver service found among registered DBus services."));
     179
    177180    return serviceNames;
    178181}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r89704 r89712  
    713713{
    714714#if defined(VBOX_WS_X11)
     715    if (m_fHostScreenSaverDisabled == fDisabled)
     716        return;
     717    m_fHostScreenSaverDisabled = fDisabled;
     718
    715719    QStringList services = X11ScrenSaverServices();
    716720    if (services.isEmpty())
    717721        return;
    718722
    719     Q_UNUSED(fDisabled);
     723    if (fDisabled)
     724        X11InhibitScrenSaver(services, m_screenSaverInhibitionCookies);
     725    else
     726        X11UninhibitScrenSaver(m_screenSaverInhibitionCookies);
     727
    720728#else
    721729    Q_UNUSED(fDisabled);
     
    880888    , m_pSoftKeyboardDialog(0)
    881889    , m_pVMInformationDialog(0)
     890    , m_fHostScreenSaverDisabled(false)
    882891{
    883892}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r89700 r89712  
    455455    UISoftKeyboard        *m_pSoftKeyboardDialog;
    456456    UIVMInformationDialog *m_pVMInformationDialog;
     457
     458    /* Holds the cookies returnd by QDBus inhibition calls. Map keys are service name. These are required during uninhibition.*/
     459    QMap<QString, uint> m_screenSaverInhibitionCookies;
     460    bool m_fHostScreenSaverDisabled;
     461
    457462    /* Friend classes: */
    458463    friend class UIMachineWindow;
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