VirtualBox

Changeset 59506 in vbox for trunk


Ignore:
Timestamp:
Jan 28, 2016 12:47:03 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:5105: Runtime UI: Preventing switching host keyboard LEDs to guest LEDs if the window is not active anymore or if it's minimized.

File:
1 edited

Legend:

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

    r59108 r59506  
    21752175void UIMachineLogic::sltSwitchKeyboardLedsToGuestLeds()
    21762176{
     2177    /* Due to async nature of that feature
     2178     * it can happen that this slot is called when machine-window is
     2179     * minimized or not active anymore, we should ignore those cases. */
     2180    QWidget *pActiveWindow = QApplication::activeWindow();
     2181    if (   !pActiveWindow                                 // no window is active anymore
     2182        || !qobject_cast<UIMachineWindow*>(pActiveWindow) // window is not machine one
     2183        || pActiveWindow->isMinimized())                  // window is minimized
     2184    {
     2185        LogRel2(("GUI: HID LEDs Sync: skipping sync because active window is lost or minimized!\n"));
     2186        return;
     2187    }
     2188
    21772189//    /* Log statement (printf): */
    21782190//    QString strDt = QDateTime::currentDateTime().toString("HH:mm:ss:zzz");
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