VirtualBox

Changeset 102518 in vbox for trunk/src


Ignore:
Timestamp:
Dec 7, 2023 11:42:19 AM (14 months ago)
Author:
vboxsync
Message:

FE/Qt: Added a --no-keyboard-grabbing option to help with debugging VirtualBoxVM on windows. Ignored on other hosts atm.

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

Legend:

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

    r102508 r102518  
    208208#endif
    209209    , m_fRestoreCurrentSnapshot(false)
     210    , m_fNoKeyboardGrabbing(false)
    210211    , m_fExecuteAllInIem(false)
    211212    , m_uWarpPct(100)
     
    500501            enmOptType = OptType_VMRunner;
    501502            m_fRestoreCurrentSnapshot = true;
     503        }
     504        else if (!::strcmp(arg, "--no-keyboard-grabbing"))
     505        {
     506            enmOptType = OptType_VMRunner;
     507            m_fNoKeyboardGrabbing = true;
    502508        }
    503509        /* Ad hoc VM reconfig options: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r102503 r102518  
    265265        void setShouldRestoreCurrentSnapshot(bool fRestore) { m_fRestoreCurrentSnapshot = fRestore; }
    266266
     267        /** Returns the --no-keyboard-grabbing option value (whether we should restore
     268         *  grab the keyboard or not - for debugging). */
     269        bool shouldNotGrabKeyboard() const { return m_fNoKeyboardGrabbing; }
     270
    267271        /** Returns the --fda option value (whether we have floppy image). */
    268272        bool hasFloppyImageToMount() const { return !m_uFloppyImage.isNull(); }
     
    694698        bool  m_fRestoreCurrentSnapshot;
    695699
     700        /** Holds the --no-keyboard-grabbing option value. */
     701        bool  m_fNoKeyboardGrabbing;
     702
    696703        /** Holds the --fda option value (floppy image). */
    697704        QUuid  m_uFloppyImage;
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r101571 r102518  
    294294        "  --driverless               Do not open the support driver (NEM or IEM mode).\n"
    295295        "  --warp-pct <pct>           time warp factor, 100%% (= 1.0) = normal speed\n"
     296        "  --no-keyboard-grabbing     Don't grab the keyboard on windows (for debugging).\n"
    296297        "\n"
    297298# ifdef VBOX_WITH_DEBUGGER_GUI
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r100064 r102518  
    11441144
    11451145                /* If keyboard-hook is NOT installed;
    1146                  * Or installed but NOT for that view: */
    1147                 if (!m_keyboardHook || (int)uScreenId != m_iKeyboardHookViewIndex)
     1146                 * Or installed but NOT for that view
     1147                 * AND no --no-keyboard-grabbing option: */
     1148                if (   (!m_keyboardHook || (int)uScreenId != m_iKeyboardHookViewIndex)
     1149                    && !uiCommon().shouldNotGrabKeyboard())
    11481150                {
    11491151                    /* If keyboard-hook is installed: */
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