VirtualBox

Changeset 73976 in vbox for trunk/src


Ignore:
Timestamp:
Aug 30, 2018 12:03:58 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9085. Insert a host key combo release to the guest in the event of focus out

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

Legend:

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

    r73924 r73976  
    11721172            case QEvent::FocusOut:
    11731173            {
     1174                /* If host key combo press has been inserted (with no release yet) insert a release now: */
     1175                if (m_fHostKeyComboPressInserted)
     1176                    machineLogic()->typeHostKeyComboPressRelease(false);
     1177
    11741178#if defined(VBOX_WS_MAC)
    11751179
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r73926 r73976  
    26132613}
    26142614
     2615void UIMachineLogic::typeHostKeyComboPressRelease(bool fToggleSequence)
     2616{
     2617    QAction *pHostKeyAction = actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_T_TypeHostKeyCombo);
     2618    if (!pHostKeyAction)
     2619        return;
     2620    /* Do nothing if we try to insert host key combo press (release) and it is already in pressed (released) state: */
     2621    if (fToggleSequence == pHostKeyAction->isChecked())
     2622        return;
     2623    pHostKeyAction->toggle();
     2624}
     2625
    26152626void UIMachineLogic::updateMenuDevicesStorage(QMenu *pMenu)
    26162627{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r73847 r73976  
    158158    /** Returns whether VM should perform HID LEDs synchronization. */
    159159    bool isHidLedsSyncEnabled() const { return m_fIsHidLedsSyncEnabled; }
     160    /** An public interface to sltTypeHostKeyComboPressRelease. */
     161    void typeHostKeyComboPressRelease(bool fToggleSequence);
    160162
    161163protected slots:
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