VirtualBox

Changeset 2377 in vbox


Ignore:
Timestamp:
Apr 27, 2007 2:49:06 AM (18 years ago)
Author:
vboxsync
Message:

Don't assert when the screensaver takes over.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/darwin/DarwinKeyboard.cpp

    r2348 r2377  
    239239
    240240
    241 /** Keeping track of whether we disabled the hotkeys or not. */
    242 static bool g_fHotKeysDisabled = false;
    243241/** Whether we've connected or not. */
    244242static bool g_fConnectedToCGS = false;
     
    449447    else
    450448    {
    451         if (    enmMode != kCGSGlobalHotKeyDisable
    452             /*||  !g_fHotKeysDisabled*/)
     449        if (enmMode != kCGSGlobalHotKeyDisable)
    453450            return;
    454451        enmMode = kCGSGlobalHotKeyEnable;
     
    461458    CGSGlobalHotKeyOperatingMode enmNewMode = kCGSGlobalHotKeyInvalid;
    462459    CGSGetGlobalHotKeyOperatingMode(g_CGSConnection, &enmNewMode);
    463     if (enmNewMode == enmMode)
    464         g_fHotKeysDisabled = enmMode == kCGSGlobalHotKeyDisable;
    465     else
    466     {
    467         AssertMsgFailed(("enmNewMode=%d enmMode=%d\n", enmNewMode, enmMode));
     460    if (enmNewMode != enmMode)
     461    {
     462        /* If the screensaver kicks in we should ignore failure here. */
     463        AssertMsg(enmMode == kCGSGlobalHotKeyEnable, ("enmNewMode=%d enmMode=%d\n", enmNewMode, enmMode));
    468464        if (s_cComplaints++ < 32)
    469465            LogRel(("DarwinDisableGlobalHotKeys: Failed to change mode; enmNewMode=%d enmMode=%d\n", enmNewMode, enmMode));
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