VirtualBox

Changeset 99838 in vbox for trunk


Ignore:
Timestamp:
May 18, 2023 10:06:30 AM (17 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10450: Runtime UI: Remaining bits fixing Qt6 compatibility for UIKeyboardHandler, s.a. r154940.

File:
1 edited

Legend:

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

    r99479 r99838  
    13661366        return false;
    13671367
     1368    if (!m_fKeyboardCaptured)
     1369        return false;
     1370
    13681371    /* It's possible that a key has been pressed while the keyboard was not
    13691372     * captured, but is being released under the capture. Detect this situation
    13701373     * and do not pass on the key press to the virtual machine. */
    1371 /** @todo r=bird: Why do this complicated test before the simple m_fKeyboardCaptured one? */
    13721374    uint8_t what_pressed =      (event.flags & 0x01)
    13731375                             && (event.vkCode != VK_RSHIFT)
    13741376                           ? IsExtKeyPressed : IsKeyPressed;
    13751377    if (   (event.flags & 0x80) /* released */
    1376         && (   (   UIHostCombo::toKeyCodeList(gEDataManager->hostKeyCombination()).contains(event.vkCode)
     1378        && (   (   UIHostCombo::toKeyCodeList(gEDataManager->hostKeyCombination()).contains((int)event.vkCode)
    13771379                && !m_fIsHostkeyInCapture)
    13781380            ||    (  m_pressedKeys[event.scanCode & 0x7F]
    13791381                   & (IsKbdCaptured | what_pressed))
    13801382               == what_pressed))
    1381         return false;
    1382 
    1383     if (!m_fKeyboardCaptured)
    13841383        return false;
    13851384
     
    17851784            symbol = 0;
    17861785        if (symbol)
    1787             fWasProcessed = actionPool()->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + QChar(symbol).toUpper().unicode())));
     1786            fWasProcessed = actionPool()->processHotKey(QKeySequence(QChar(symbol).toUpper().unicode()));
    17881787    }
    17891788    delete[] pList;
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