VirtualBox

Changeset 89908 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 25, 2021 9:45:38 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145366
Message:

FE/Qt: bugref:3355. Hiding screen ssaver inhibition option on MacOS

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

Legend:

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

    r89823 r89908  
    154154}
    155155
    156 SHARED_LIBRARY_STUFF bool X11CheckExtension(const char *extensionName)
     156bool X11CheckExtension(const char *extensionName)
    157157{
    158158    Display *pDisplay = QX11Info::display();
     
    163163}
    164164
    165 static QStringList X11FindDBusScreenSaverServices(const QDBusConnection &connection)
     165QStringList X11FindDBusScreenSaverServices(const QDBusConnection &connection)
    166166{
    167167    QStringList serviceNames;
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h

    r89823 r89908  
    2929#include "UILibraryDefs.h"
    3030
     31/* Forward declarations: */
     32class QDBusConnection;
    3133
    3234/** X11: Known Window Manager types. */
     
    6567SHARED_LIBRARY_STUFF bool X11CheckExtension(const char *extensionName);
    6668
     69/** Returns the list of DBus services whose name contains the substring 'screensaver'. */
     70QStringList X11FindDBusScreenSaverServices(const QDBusConnection &connection);
     71
    6772/** Returns the list of Inhibit methods found by introspecting DBus services. */
    6873SHARED_LIBRARY_STUFF QVector<X11ScreenSaverInhibitMethod*> X11FindDBusScrenSaverInhibitMethods();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp

    r89688 r89908  
    118118    m_pEditorMaximumGuestScreenSize->setValue(oldData.m_guiMaximumGuestScreenSizeValue);
    119119    m_pCheckBoxActivateOnMouseHover->setChecked(oldData.m_fActivateHoveredMachineWindow);
     120#if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
    120121    m_pCheckBoxDisableHostScreenSaver->setChecked(oldData.m_fDisableHostScreenSaver);
     122#endif
    121123    m_pEditorScaleFactor->setScaleFactors(oldData.m_scaleFactors);
    122124    m_pEditorScaleFactor->setMonitorCount(gpDesktop->screenCount());
     
    131133    newData.m_guiMaximumGuestScreenSizeValue = m_pEditorMaximumGuestScreenSize->value();
    132134    newData.m_fActivateHoveredMachineWindow = m_pCheckBoxActivateOnMouseHover->isChecked();
     135#if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
    133136    newData.m_fDisableHostScreenSaver = m_pCheckBoxDisableHostScreenSaver->isChecked();
     137#endif
    134138    newData.m_scaleFactors = m_pEditorScaleFactor->scaleFactors();
    135139    m_pCache->cacheCurrentData(newData);
     
    158162    m_pCheckBoxActivateOnMouseHover->setWhatsThis(tr("When checked, machine windows will be raised when the mouse pointer moves over them."));
    159163    m_pCheckBoxActivateOnMouseHover->setText(tr("&Raise Window Under Mouse"));
     164#if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
    160165    m_pCheckBoxDisableHostScreenSaver->setWhatsThis(tr("When checked, screen saver of the host OS is disabled."));
    161166    m_pCheckBoxDisableHostScreenSaver->setText(tr("&Disable Host Screen Saver"));
     167#endif
    162168}
    163169
     
    246252            pLayoutMain->addWidget(m_pCheckBoxActivateOnMouseHover, 5, 1);
    247253
     254#if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
    248255        /* Prepare 'disable host screen saver' check-box: */
    249256        m_pCheckBoxDisableHostScreenSaver = new QCheckBox(this);
    250257        if (m_pCheckBoxDisableHostScreenSaver)
    251258            pLayoutMain->addWidget(m_pCheckBoxDisableHostScreenSaver, 6, 1);
     259#endif
    252260    }
    253261}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h

    r89688 r89908  
    9797        /** Holds the 'activate on mouse hover' check-box instance. */
    9898        QCheckBox                      *m_pCheckBoxActivateOnMouseHover;
     99#if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
    99100        /** Holds the 'disable host screen saver' check-box instance. */
    100101        QCheckBox                      *m_pCheckBoxDisableHostScreenSaver;
     102#endif
    101103    /** @} */
    102104};
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette