VirtualBox

Changeset 27089 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 5, 2010 1:59:37 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
58414
Message:

FE/Qt4: New running VM core: just a cosmetics.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless
Files:
2 edited

Legend:

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

    r27056 r27089  
    110110}
    111111
    112 #ifdef Q_WS_X11
    113 bool UIMachineWindowSeamless::x11Event(XEvent *pEvent)
    114 {
    115     /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut,
    116      * WindowActivate and WindowDeactivate Qt events are not properly sent
    117      * on top level window (i.e. this) deactivation. The fix is to substiute
    118      * the mode in FocusOut X11 event structure to NotifyNormal to cause
    119      * Qt to process it as desired. */
    120     if (pEvent->type == FocusOut)
    121     {
    122         if (pEvent->xfocus.mode == NotifyWhileGrabbed  &&
    123             (pEvent->xfocus.detail == NotifyAncestor ||
    124              pEvent->xfocus.detail == NotifyInferior ||
    125              pEvent->xfocus.detail == NotifyNonlinear))
    126         {
    127              pEvent->xfocus.mode = NotifyNormal;
    128         }
    129     }
    130     return false;
    131 }
    132 #endif
    133 
    134112#ifdef Q_WS_MAC
    135113bool UIMachineWindowSeamless::event(QEvent *pEvent)
     
    149127}
    150128#endif /* Q_WS_MAC */
     129
     130#ifdef Q_WS_X11
     131bool UIMachineWindowSeamless::x11Event(XEvent *pEvent)
     132{
     133    /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut,
     134     * WindowActivate and WindowDeactivate Qt events are not properly sent
     135     * on top level window (i.e. this) deactivation. The fix is to substiute
     136     * the mode in FocusOut X11 event structure to NotifyNormal to cause
     137     * Qt to process it as desired. */
     138    if (pEvent->type == FocusOut)
     139    {
     140        if (pEvent->xfocus.mode == NotifyWhileGrabbed  &&
     141            (pEvent->xfocus.detail == NotifyAncestor ||
     142             pEvent->xfocus.detail == NotifyInferior ||
     143             pEvent->xfocus.detail == NotifyNonlinear))
     144        {
     145             pEvent->xfocus.mode = NotifyNormal;
     146        }
     147    }
     148    return false;
     149}
     150#endif
    151151
    152152void UIMachineWindowSeamless::closeEvent(QCloseEvent *pEvent)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h

    r27056 r27089  
    5656
    5757    /* Event handlers: */
     58#ifdef Q_WS_MAC
     59    bool event(QEvent *pEvent);
     60#endif /* Q_WS_MAC */
    5861#ifdef Q_WS_X11
    5962    bool x11Event(XEvent *pEvent);
    6063#endif /* Q_WS_X11 */
    6164    void closeEvent(QCloseEvent *pEvent);
    62 #ifdef Q_WS_MAC
    63     bool event(QEvent *pEvent);
    64 #endif /* Q_WS_MAC */
    6565
    6666    /* Prepare helpers: */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette