VirtualBox

Changeset 53249 in vbox for trunk/src


Ignore:
Timestamp:
Nov 6, 2014 9:14:36 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96808
Message:

FE/Qt: 7582: Runtime UI: Make the activate-on-hover behavior configurable.

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

Legend:

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

    r52937 r53249  
    4646const char* UIExtraDataDefs::GUI_RestrictedGlobalSettingsPages = "GUI/RestrictedGlobalSettingsPages";
    4747const char* UIExtraDataDefs::GUI_RestrictedMachineSettingsPages = "GUI/RestrictedMachineSettingsPages";
     48
     49/* Settings: Display: */
     50const char* UIExtraDataDefs::GUI_ActivateHoveredMachineWindow = "GUI/ActivateHoveredMachineWindow";
    4851
    4952/* Settings: Keyboard: */
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r53086 r53249  
    5959    /** @name Settings
    6060      * @{ */
    61         /** Holds restricted Plobal Settings pages. */
     61        /** Holds restricted Global Settings pages. */
    6262        extern const char* GUI_RestrictedGlobalSettingsPages;
    6363        /** Holds restricted Machine Settings pages. */
    6464        extern const char* GUI_RestrictedMachineSettingsPages;
     65    /** @} */
     66
     67    /** @name Settings: Display
     68      * @{ */
     69        /** Holds whether hovered machine-window should be activated. */
     70        extern const char* GUI_ActivateHoveredMachineWindow;
    6571    /** @} */
    6672
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r52937 r53249  
    17571757#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    17581758           << GUI_RestrictedGlobalSettingsPages << GUI_RestrictedMachineSettingsPages
     1759           << GUI_ActivateHoveredMachineWindow
    17591760           << GUI_Input_SelectorShortcuts << GUI_Input_MachineShortcuts
    17601761           << GUI_RecentFolderHD << GUI_RecentFolderCD << GUI_RecentFolderFD
     
    20862087}
    20872088
     2089bool UIExtraDataManager::activateHoveredMachineWindow()
     2090{
     2091    /* 'False' unless feature allowed: */
     2092    return isFeatureAllowed(GUI_ActivateHoveredMachineWindow);
     2093}
     2094
    20882095QStringList UIExtraDataManager::shortcutOverrides(const QString &strPoolExtraDataID)
    20892096{
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r52937 r53249  
    163163        /** Returns restricted machine settings pages. */
    164164        QList<MachineSettingsPageType> restrictedMachineSettingsPages(const QString &strID);
     165    /** @} */
     166
     167    /** @name Settings: Display
     168      * @{ */
     169        /** Returns whether hovered machine-window should be activated. */
     170        bool activateHoveredMachineWindow();
    165171    /** @} */
    166172
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r53079 r53249  
    3636# include "UIMachineView.h"
    3737# include "UIFrameBuffer.h"
     38# include "UIExtraDataManager.h"
    3839
    3940# ifdef Q_WS_WIN
     
    614615#endif /* Q_WS_X11 */
    615616                    /* Check if we should activate window under cursor: */
    616                     if (!uisession()->isMouseCaptured() &&
     617                    if (gEDataManager->activateHoveredMachineWindow() &&
     618                        !uisession()->isMouseCaptured() &&
    617619                        QApplication::activeWindow() &&
    618620                        m_windows.values().contains(QApplication::activeWindow()) &&
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