VirtualBox

Changeset 49423 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 8, 2013 4:25:35 PM (11 years ago)
Author:
vboxsync
Message:

Do not block input on keyboard queue level when VM is paused.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp

    r44528 r49423  
    5252    /** The queue handle. */
    5353    PPDMQUEUE                   pQueue;
    54     /** Discard input when this flag is set.
    55      * We only accept input when the VM is running. */
     54    /** Discard input when this flag is set. */
    5655    bool                        fInactive;
     56    /** When VM is suspended, queue full errors are not fatal. */
     57    bool                        fSuspended;
    5758} DRVKBDQUEUE, *PDRVKBDQUEUE;
    5859
     
    106107{
    107108    PDRVKBDQUEUE pDrv = IKEYBOARDPORT_2_DRVKBDQUEUE(pInterface);
     109    /* Ignore any attempt to send events if queue is inactive. */
    108110    if (pDrv->fInactive)
    109111        return VINF_SUCCESS;
     
    116118        return VINF_SUCCESS;
    117119    }
    118     AssertMsgFailed(("drvKbdQueuePutEvent: Queue is full!!!!\n"));
     120    if (!pDrv->fSuspended)
     121        AssertMsgFailed(("drvKbdQueuePutEvent: Queue is full!!!!\n"));
    119122    return VERR_PDM_NO_QUEUE_ITEMS;
    120123}
     
    209212{
    210213    PDRVKBDQUEUE        pThis = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE);
    211     pThis->fInactive = true;
     214    pThis->fSuspended = true;
    212215}
    213216
     
    222225{
    223226    PDRVKBDQUEUE        pThis = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE);
    224     pThis->fInactive = false;
     227    pThis->fSuspended = false;
    225228}
    226229
     
    259262     */
    260263    pDrv->fInactive                         = true;
     264    pDrv->fSuspended                        = false;
    261265    /* IBase. */
    262266    pDrvIns->IBase.pfnQueryInterface        = drvKbdQueueQueryInterface;
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