VirtualBox

Changeset 55346 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 20, 2015 5:27:35 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: Mac OS X: Cleanup: No forced presentation-mode for native full-screen.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp

    r52722 r55346  
    6767    remapScancodes = QString::null;
    6868    proxySettings = QString::null;
    69     presentationModeEnabled = false;
    7069    hostScreenSaverDisabled = false;
    7170}
     
    8079    remapScancodes = that.remapScancodes;
    8180    proxySettings = that.proxySettings;
    82     presentationModeEnabled = that.presentationModeEnabled;
    8381    hostScreenSaverDisabled = that.hostScreenSaverDisabled;
    8482}
     
    9896         remapScancodes == that.remapScancodes &&
    9997         proxySettings == that.proxySettings &&
    100          presentationModeEnabled == that.presentationModeEnabled &&
    10198         hostScreenSaverDisabled == that.hostScreenSaverDisabled
    10299        );
     
    128125    { "GUI/RemapScancodes",                        "remapScancodes",          "(\\d+=\\d+,)*\\d+=\\d+", true },
    129126    { "GUI/ProxySettings",                         "proxySettings",           "[\\s\\S]*", true },
    130 #ifdef Q_WS_MAC
    131     { GUI_PresentationModeEnabled,                 "presentationModeEnabled", "true|false", true },
    132 #endif /* Q_WS_MAC */
    133127    { "GUI/HostScreenSaverDisabled",               "hostScreenSaverDisabled", "true|false", true }
    134128};
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h

    r52722 r55346  
    4343    QString remapScancodes;
    4444    QString proxySettings;
    45     bool presentationModeEnabled;
    4645    bool hostScreenSaverDisabled;
    4746
     
    6160    Q_PROPERTY (QString remapScancodes READ remapScancodes WRITE setRemapScancodes)
    6261    Q_PROPERTY (QString proxySettings READ proxySettings WRITE setProxySettings)
    63     Q_PROPERTY (bool presentationModeEnabled READ presentationModeEnabled WRITE setPresentationModeEnabled)
    6462    Q_PROPERTY (bool hostScreenSaverDisabled READ hostScreenSaverDisabled WRITE setHostScreenSaverDisabled)
    6563
     
    118116    }
    119117
    120     bool presentationModeEnabled() const { return data()->presentationModeEnabled; }
    121     void setPresentationModeEnabled (bool enabled)
    122     {
    123         mData()->presentationModeEnabled = enabled;
    124     }
    125 
    126118    bool hostScreenSaverDisabled() const { return data()->hostScreenSaverDisabled; }
    127119    void setHostScreenSaverDisabled (bool disabled)
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp

    r55187 r55346  
    134134const char* UIExtraDataDefs::GUI_StatusBar_IndicatorOrder = "GUI/StatusBar/IndicatorOrder";
    135135#ifdef Q_WS_MAC
    136 const char* UIExtraDataDefs::GUI_PresentationModeEnabled = "GUI/PresentationModeEnabled";
    137136const char* UIExtraDataDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled";
    138137const char* UIExtraDataDefs::GUI_RealtimeDockIconUpdateMonitor = "GUI/RealtimeDockIconUpdateMonitor";
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r55187 r55346  
    230230        extern const char* GUI_StatusBar_IndicatorOrder;
    231231#ifdef Q_WS_MAC
    232         /** Mac OS X: Holds whether 'presentation mode' enabled. */
    233         extern const char* GUI_PresentationModeEnabled;
    234232        /** Mac OS X: Holds whether Dock icon should be updated at runtime. */
    235233        extern const char* GUI_RealtimeDockIconUpdateEnabled;
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r55274 r55346  
    17911791           << GUI_StatusBar_Enabled << GUI_RestrictedStatusBarIndicators << GUI_StatusBar_IndicatorOrder
    17921792#ifdef Q_WS_MAC
    1793            << GUI_PresentationModeEnabled
    17941793           << GUI_RealtimeDockIconUpdateEnabled << GUI_RealtimeDockIconUpdateMonitor
    17951794#endif /* Q_WS_MAC */
     
    33203319
    33213320#ifdef Q_WS_MAC
    3322 bool UIExtraDataManager::presentationModeEnabled(const QString &strID)
    3323 {
    3324     /* 'False' unless feature allowed: */
    3325     return isFeatureAllowed(GUI_PresentationModeEnabled, strID);
    3326 }
    3327 
    33283321bool UIExtraDataManager::realtimeDockIconUpdateEnabled(const QString &strID)
    33293322{
     
    36473640            else if (strKey == GUI_Input_MachineShortcuts)
    36483641                emit sigRuntimeUIShortcutChange();
    3649 #ifdef Q_WS_MAC
    3650             /* 'Presentation mode' status changed (allowed if not restricted)? */
    3651             else if (strKey == GUI_PresentationModeEnabled)
    3652                 emit sigPresentationModeChange(!isFeatureRestricted(strKey));
    3653 #endif /* Q_WS_MAC */
    36543642        }
    36553643    }
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r55187 r55346  
    8686
    8787#ifdef RT_OS_DARWIN
    88     /** Mac OS X: Notifies about 'presentation mode' status change. */
    89     void sigPresentationModeChange(bool fEnabled);
    9088    /** Mac OS X: Notifies about 'dock icon' appearance change. */
    9189    void sigDockIconAppearanceChange(bool fEnabled);
     
    448446
    449447#ifdef Q_WS_MAC
    450         /** Mac OS X: Returns whether 'presentation mode' enabled. */
    451         bool presentationModeEnabled(const QString &strID);
    452 
    453448        /** Mac OS X: Returns whether Dock icon should be updated at runtime. */
    454449        bool realtimeDockIconUpdateEnabled(const QString &strID);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp

    r53954 r55346  
    212212}
    213213
    214 bool UIMultiScreenLayout::isHostTaskbarCovert() const
    215 {
    216     /* Check for all screens which are in use if they have some
    217      * taskbar/menubar/dock on it. Its done by comparing the available with the
    218      * screen geometry. Only if they are the same for all screens, there are no
    219      * host area covert. This is a little bit ugly, but there seems no other
    220      * way to find out if we are on a screen where the taskbar/dock or whatever
    221      * is present. */
    222     QDesktopWidget *pDW = QApplication::desktop();
    223     for (int i = 0; i < m_screenMap.size(); ++i)
    224     {
    225         int hostScreen = m_screenMap.value(i);
    226         if (pDW->availableGeometry(hostScreen) != pDW->screenGeometry(hostScreen))
    227             return true;
    228     }
    229     return false;
    230 }
    231 
    232214void UIMultiScreenLayout::sltHandleScreenLayoutChange(int iRequestedGuestScreen, int iRequestedHostScreen)
    233215{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h

    r52727 r55346  
    5454    bool hasHostScreenForGuestScreen(int iScreenId) const;
    5555    quint64 memoryRequirements() const;
    56     bool isHostTaskbarCovert() const;
    5756
    5857private slots:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r54463 r55346  
    389389}
    390390
    391 #ifdef Q_WS_MAC
    392 void UIMachineLogicFullscreen::sltChangePresentationMode(bool /* fEnabled */)
    393 {
    394     setPresentationModeEnabled(true);
    395 }
    396 #endif /* Q_WS_MAC */
    397 
    398391void UIMachineLogicFullscreen::sltScreenLayoutChanged()
    399392{
     
    407400        foreach (UIMachineWindow *pMachineWindow, machineWindows())
    408401            pMachineWindow->showInNecessaryMode();
    409         /* Update 'presentation mode': */
    410         setPresentationModeEnabled(true);
    411402    }
    412403    /* Revalidate native fullscreen for ML and next: */
     
    504495}
    505496
    506 #ifdef Q_WS_MAC
    507 void UIMachineLogicFullscreen::prepareOtherConnections()
    508 {
    509     /* Make sure 'presentation mode' preference handling
    510      * is updated at runtime for Lion and previous: */
    511     if (vboxGlobal().osRelease() <= MacOSXRelease_Lion)
    512         connect(gEDataManager, SIGNAL(sigPresentationModeChange(bool)),
    513                 this, SLOT(sltChangePresentationMode(bool)));
    514 }
    515 #endif /* Q_WS_MAC */
    516 
    517497void UIMachineLogicFullscreen::prepareMachineWindows()
    518498{
     
    555535
    556536#ifdef Q_WS_MAC
    557     /* Activate 'presentation mode': */
    558     setPresentationModeEnabled(true);
    559 
    560537    /* For ML and next: */
    561538    if (vboxGlobal().osRelease() > MacOSXRelease_Lion)
     
    636613    foreach (UIMachineWindow *pMachineWindow, machineWindows())
    637614        UIMachineWindow::destroy(pMachineWindow);
    638 
    639 #ifdef Q_WS_MAC
    640     /* Deactivate 'presentation mode': */
    641     setPresentationModeEnabled(false);
    642 #endif/* Q_WS_MAC */
    643615}
    644616
     
    682654
    683655#ifdef Q_WS_MAC
    684 void UIMachineLogicFullscreen::setPresentationModeEnabled(bool fEnabled)
    685 {
    686     /* Should we enable it? */
    687     if (fEnabled)
    688     {
    689         /* For Lion and previous: */
    690         if (vboxGlobal().osRelease() <= MacOSXRelease_Lion)
    691         {
    692             /* Check if we have screen which contains the Dock or the Menubar (which hasn't to be the same),
    693              * only than the 'presentation mode' have to be changed. */
    694             if (m_pScreenLayout->isHostTaskbarCovert())
    695             {
    696                 if (gEDataManager->presentationModeEnabled(vboxGlobal().managedVMUuid()))
    697                     SetSystemUIMode(kUIModeAllHidden, 0);
    698                 else
    699                     SetSystemUIMode(kUIModeAllSuppressed, 0);
    700             }
    701         }
    702         /* For ML and next: */
    703         else
    704         {
    705             /* I am not sure we have to check anything here.
    706              * Without 'presentation mode' native fullscreen works pretty bad,
    707              * so we have to enable it anyway: */
    708             SetSystemUIMode(kUIModeAllSuppressed, 0);
    709         }
    710     }
    711     /* Should we disable it? */
    712     else SetSystemUIMode(kUIModeNormal, 0);
    713 }
    714 
    715656void UIMachineLogicFullscreen::revalidateNativeFullScreen(UIMachineWindow *pMachineWindow)
    716657{
     
    771712                LogRel(("UIMachineLogicFullscreen::revalidateNativeFullScreen: "
    772713                        "Ask machine-window #%d to enter native fullscreen.\n", (int)uScreenID));
    773 
    774                 /* Update 'presentation mode': */
    775                 setPresentationModeEnabled(true);
    776714
    777715                /* Make sure window have proper geometry and shown: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h

    r52752 r55346  
    100100    void sltInvokePopupMenu();
    101101
    102 #ifdef RT_OS_DARWIN
    103     void sltChangePresentationMode(bool fEnabled);
    104 #endif /* RT_OS_DARWIN */
    105 
    106102    /** Updates machine-window(s) location/size on screen-layout changes. */
    107103    void sltScreenLayoutChanged();
     
    119115    void prepareActionGroups();
    120116    void prepareActionConnections();
    121 #ifdef Q_WS_MAC
    122     void prepareOtherConnections();
    123 #endif /* Q_WS_MAC */
    124117    void prepareMachineWindows();
    125118    void prepareMenu();
     
    128121    void cleanupMenu();
    129122    void cleanupMachineWindows();
    130 #ifdef Q_WS_MAC
    131     //void cleanupOtherConnections() {}
    132 #endif /* Q_WS_MAC */
    133123    void cleanupActionConnections();
    134124    void cleanupActionGroups();
    135125
    136126#ifdef Q_WS_MAC
    137     void setPresentationModeEnabled(bool fEnabled);
    138 
    139127    /** Mac OS X: Revalidates 'fullscreen' mode for @a pMachineWindow. */
    140128    void revalidateNativeFullScreen(UIMachineWindow *pMachineWindow);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp

    r53449 r55346  
    3535    Ui::UIGlobalSettingsGeneral::setupUi(this);
    3636
    37 #ifndef Q_WS_MAC
    38     m_pLabelPresentationMode->hide();
    39     m_pCheckBoxPresentationMode->hide();
    40 #endif /* !Q_WS_MAC */
    4137    /* Hide checkbox for now: */
    4238    m_pLabelHostScreenSaver->hide();
     
    6258    m_cache.m_strDefaultMachineFolder = m_properties.GetDefaultMachineFolder();
    6359    m_cache.m_strVRDEAuthLibrary = m_properties.GetVRDEAuthLibrary();
    64 #ifdef Q_WS_MAC
    65     m_cache.m_fPresentationModeEnabled = m_settings.presentationModeEnabled();
    66 #endif /* Q_WS_MAC */
    6760    m_cache.m_fHostScreenSaverDisabled = m_settings.hostScreenSaverDisabled();
    6861
     
    7871    m_pSelectorMachineFolder->setPath(m_cache.m_strDefaultMachineFolder);
    7972    m_pSelectorVRDPLibName->setPath(m_cache.m_strVRDEAuthLibrary);
    80 #ifdef Q_WS_MAC
    81     m_pCheckBoxPresentationMode->setChecked(m_cache.m_fPresentationModeEnabled);
    82 #endif /* Q_WS_MAC */
    8373    m_pCheckBoxHostScreenSaver->setChecked(m_cache.m_fHostScreenSaverDisabled);
    8474}
     
    9181    m_cache.m_strDefaultMachineFolder = m_pSelectorMachineFolder->path();
    9282    m_cache.m_strVRDEAuthLibrary = m_pSelectorVRDPLibName->path();
    93 #ifdef Q_WS_MAC
    94     m_cache.m_fPresentationModeEnabled = m_pCheckBoxPresentationMode->isChecked();
    95 #endif /* Q_WS_MAC */
    9683    m_cache.m_fHostScreenSaverDisabled = m_pCheckBoxHostScreenSaver->isChecked();
    9784}
     
    10996    if (m_properties.isOk() && m_pSelectorVRDPLibName->isModified())
    11097        m_properties.SetVRDEAuthLibrary(m_cache.m_strVRDEAuthLibrary);
    111 #ifdef Q_WS_MAC
    112     m_settings.setPresentationModeEnabled(m_cache.m_fPresentationModeEnabled);
    113 #endif /* Q_WS_MAC */
    11498    m_settings.setHostScreenSaverDisabled(m_cache.m_fHostScreenSaverDisabled);
    11599
     
    123107    setTabOrder(pWidget, m_pSelectorMachineFolder);
    124108    setTabOrder(m_pSelectorMachineFolder, m_pSelectorVRDPLibName);
    125     setTabOrder(m_pSelectorVRDPLibName, m_pCheckBoxPresentationMode);
    126     setTabOrder(m_pCheckBoxPresentationMode, m_pCheckBoxHostScreenSaver);
     109    setTabOrder(m_pSelectorVRDPLibName, m_pCheckBoxHostScreenSaver);
    127110}
    128111
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h

    r52727 r55346  
    2727    QString m_strDefaultMachineFolder;
    2828    QString m_strVRDEAuthLibrary;
    29 #ifdef Q_WS_MAC
    30     bool m_fPresentationModeEnabled;
    31 #endif /* Q_WS_MAC */
    3229    bool m_fHostScreenSaverDisabled;
    3330};
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.ui

    r48576 r55346  
    7272   </item>
    7373   <item row="2" column="0">
    74     <widget class="QLabel" name="m_pLabelPresentationMode">
    75      <property name="text">
    76       <string>&amp;Dock and Menubar:</string>
    77      </property>
    78      <property name="alignment">
    79       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    80      </property>
    81      <property name="buddy">
    82       <cstring>m_pCheckBoxPresentationMode</cstring>
    83      </property>
    84     </widget>
    85    </item>
    86    <item row="2" column="1">
    87     <widget class="QCheckBox" name="m_pCheckBoxPresentationMode">
    88      <property name="text">
    89       <string>Auto-Show in Fullscreen</string>
    90      </property>
    91      <property name="whatsThis">
    92       <string>When checked, the host dock and menu bar will be shown when the virtual machine is in fullscreen mode.</string>
    93      </property>
    94     </widget>
    95    </item>
    96    <item row="3" column="0">
    9774    <widget class="QLabel" name="m_pLabelHostScreenSaver">
    9875     <property name="text">
     
    10784    </widget>
    10885   </item>
    109    <item row="3" column="1">
     86   <item row="2" column="1">
    11087    <widget class="QCheckBox" name="m_pCheckBoxHostScreenSaver">
    11188     <property name="whatsThis">
     
    11794    </widget>
    11895   </item>
    119    <item row="4" column="0" colspan="3">
     96   <item row="3" column="0" colspan="3">
    12097    <spacer>
    12198     <property name="orientation">
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